1.스크립트를 사용할때 이벤트에 삽입하는 겁니까 아님 스크립트 에디터에 삽입하는 겁니까?
2.스크립트중 한글로 되어 있는거 영어로 바꿔야 합니까?
3.기차스크립트 rpgvx찾을 려고 해도 못찾겠음....
그래서 찾았는데 혹시 이거 맞나요?
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● 정수
#--------------------------------------------------------------------------
CENTER_X = (320 - 16) * 4 # 화면 중앙의 X 좌표 * 4
CENTER_Y = (240 - 16) * 4 # 화면 중앙의 Y 좌표 * 4
#--------------------------------------------------------------------------
# ● 통행 가능 판정
# x : X 좌표
# y : Y 좌표
# d : 방향 (0,2,4,6,8) ※ 0 = 전방향 통행 불가의 경우를 판정 (점프용)
#--------------------------------------------------------------------------
def passable? (x, y, d)
# 새로운 좌표를 요구한다
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
# 좌표가 맵외의 경우
unless $game_map.valid? (new_x, new_y)
# 통행 불가
return false
end
# 디버그 모드가 ON 또한 CTRL 키가 밀리고 있는 경우
if $DEBUG and Input.press? (Input::CTRL)
# 통행가능
return true
end
super
end
#--------------------------------------------------------------------------
# ● 화면 중앙에 오도록(듯이) 맵의 표시 위치를 설정
#--------------------------------------------------------------------------
def center(x, y)
max_x = ($game_map.width - 20) * 128
max_y = ($game_map.height - 15) * 128
$game_map.display_x = [0, [x * 128 - CENTER_X, max_x]. min]. max
$game_map.display_y = [0, [y * 128 - CENTER_Y, max_y]. min]. max
end
#--------------------------------------------------------------------------
# ● 지정 위치에 이동
# x : X 좌표
# y : Y 좌표
#--------------------------------------------------------------------------
def moveto(x, y)
super
# 센터링
center(x, y)
# 엔카운트카운트를 작성
make_encounter_count
end
#--------------------------------------------------------------------------
# ● 보수 증가
#--------------------------------------------------------------------------
def increase_steps
super
# 이동 루트 강제중이 아닌 경우
unless @move_route_forcing
# 보수 증가
$game_party.increase_steps
# 보수가 짝수의 경우
if $game_party.steps % 2 == 0
# 슬립 데미지 체크
$game_party.check_map_slip_damage
end
end
end
#--------------------------------------------------------------------------
# ● 엔카운트카운트 취득
#--------------------------------------------------------------------------
def encounter_count
return @encounter_count
end
#--------------------------------------------------------------------------
# ● 엔카운트카운트 작성
#--------------------------------------------------------------------------
def make_encounter_count
# 주사위를 2 개 거절하는 이미지
n = $game_map.encounter_step
@encounter_count = rand(n) + rand(n) + 1
end
#--------------------------------------------------------------------------
# ● 리프레쉬
#--------------------------------------------------------------------------
def refresh
# 파티 인원수가 0 명의 경우
if $game_party.actors.size == 0
# 캐릭터의 파일명과 색상을 클리어
@character_name = ""
@character_hue = 0
# 메소드 종료
return
end
# 선두의 엑터를 취득
actor = $game_party.actors[0]
# 캐릭터의 파일명과 색상을 설정
@character_name = actor.character_name
@character_hue = actor.character_hue
# 불투명도와 합성 방법을 초기화
@opacity = 255
@blend_type = 0
end
#--------------------------------------------------------------------------
# ● 동위치의 이벤트 기동 판정
#--------------------------------------------------------------------------
def check_event_trigger_here(triggers)
result = false
# 이벤트 실행중의 경우
if $game_system.map_interpreter.running?
return result
end
# 전이벤트의 루프
for event in $game_map.events.values
# 이벤트의 좌표와 트리거가 일치했을 경우
if event.x == @x and event.y == @y and triggers.include? (event.trigger)
# 기동 판정이 동위치의 이벤트라면
if event.over_trigger?
event.start
result = true
end
end
end
return result
end
#--------------------------------------------------------------------------
# ● 정면의 이벤트 기동 판정
#--------------------------------------------------------------------------
def check_event_trigger_there(triggers)
result = false
# 이벤트 실행중의 경우
if $game_system.map_interpreter.running?
return result
end
# 정면의 좌표를 계산
new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# 전이벤트의 루프
for event in $game_map.events.values
# 이벤트의 좌표와 트리거가 일치했을 경우
if event.x == new_x and event.y == new_y and
triggers.include? (event.trigger)
# 기동 판정이 정면의 이벤트라면
unless event.over_trigger?
event.start
result = true
end
end
end
# 해당하는 이벤트가 발견되지 않았던 경우
if result == false
# 정면의 타일이 카운터라면
if $game_map.counter? (new_x, new_y)
# 1 타일안쪽의 좌표를 계산
new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# 전이벤트의 루프
for event in $game_map.events.values
# 이벤트의 좌표와 트리거가 일치했을 경우
if event.x == new_x and event.y == new_y and
triggers.include? (event.trigger)
# 기동 판정이 정면의 이벤트라면
unless event.over_trigger?
event.start
result = true
end
end
end
end
end
return result
end
#--------------------------------------------------------------------------
# ● 접촉 이벤트의 기동 판정
#--------------------------------------------------------------------------
def check_event_trigger_touch(x, y)
result = false
# 이벤트 실행중의 경우
if $game_system.map_interpreter.running?
return result
end
# 전이벤트의 루프
for event in $game_map.events.values
# 이벤트의 좌표와 트리거가 일치했을 경우
if event.x == x and event.y == y and [1,2]. include? (event.trigger)
# 기동 판정이 정면의 이벤트라면
unless event.over_trigger?
event.start
result = true
end
end
end
return result
end
#--------------------------------------------------------------------------
# ● 프레임 갱신
#--------------------------------------------------------------------------
def update
# 로컬 변수에 이동중인가 어떤가를 기억
last_moving = moving?
# 이동중, 이벤트 실행중, 이동 루트 강제중,
# 메세지 윈도우 표시중의 머지않아도 아닌 경우
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
# 방향 버튼이 밀리고 있으면, 그 방향에 플레이어를 이동
# ==========================================================================
# 방향을 보존
direction = @direction
case Input.dir8
when 1 # 좌하
move_left
move_down
# 방향 고정이 아닌 경우
unless @direction_fix
# 오른쪽 방향이었던 경우는 왼쪽을 , 오름새였던 경우는 아래를 향하는
@direction = (direction == 6 ? 4 : direction == 8 ? 2 : direction)
end
when 2 # 하
move_down
when 3 # 우하
move_down
move_right
# 방향 고정이 아닌 경우
unless @direction_fix
# 좌향이었던 경우는 오른쪽을 , 오름새였던 경우는 아래를 향하는
@direction = (direction == 4 ? 6 : direction == 8 ? 2 : direction)
end
when 4 # 좌
move_left
when 6 # 우
move_right
when 7 # 좌상
move_up
move_left
# 방향 고정이 아닌 경우
unless @direction_fix
# 오른쪽 방향이었던 경우는 왼쪽을 , 하향이었던 경우는 위를 향하는
@direction = (direction == 6 ? 4 : direction == 2 ? 8 : direction)
end
when 8 # 상
move_up
when 9 # 우상
move_right
move_up
# 방향 고정이 아닌 경우
unless @direction_fix
# 좌향이었던 경우는 오른쪽을 , 하향이었던 경우는 위를 향하는
@direction = (direction == 4 ? 6 : direction == 2 ? 8 : direction)
end
end
# ==========================================================================
end
# 로컬 변수에 좌표를 기억
last_real_x = @real_x
last_real_y = @real_y
super
# 캐릭터가 아래로 이동해, 한편 화면상의 위치가 중앙에서(보다) 아래의 경우
if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
# 맵을 아래에 스크롤
$game_map.scroll_down(@real_y - last_real_y)
end
# 캐릭터가 왼쪽으로 이동해, 한편 화면상의 위치가 중앙에서(보다) 왼쪽의 경우
if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
# 맵을 왼쪽으로 스크롤
$game_map.scroll_left(last_real_x - @real_x)
end
# 캐릭터가 오른쪽으로 이동해, 한편 화면상의 위치가 중앙에서(보다) 오른쪽의 경우
if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
# 맵을 오른쪽으로 스크롤
$game_map.scroll_right(@real_x - last_real_x)
end
# 캐릭터가 위로 이동해, 한편 화면상의 위치가 중앙에서(보다) 위의 경우
if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
# 맵을 위에 스크롤
$game_map.scroll_up(last_real_y - @real_y)
end
# 이동중이 아닌 경우
unless moving?
# 전회 플레이어가 이동중이었던 경우
if last_moving
# 동위치의 이벤트와의 접촉에 의한 이벤트 기동 판정
result = check_event_trigger_here([1,2])
# 기동한 이벤트가 없는 경우
if result == false
# 디버그 모드가 ON 또한 CTRL 키가 밀리고 있는 경우를 제외해
unless $DEBUG and Input.press? (Input::CTRL)
# 엔카운트카운트다운
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
# C 버튼이 밀렸을 경우
if Input.trigger? (Input::C)
# 동위치 및 정면의 이벤트 기동 판정
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
end
end
4.기차놀이 스크립트 사용시 동료를 바꿀순 없나여?
급합니다! 빨리 정확한 답변 부탁
'저도 모릅니다'이런 댓글 올리지좀 마셈 부탁
다른 스크립터가 작성한 스크립트는 무조건 스크립트 에디터에서 메인 바로 위에 넣어줍니다
이벤트의 스크립트 같은 경우는 스크립트 다룰줄 아는 사람이나 혹은 스크립터가 임의로 명령어 비슷하게 만들어놓고 사용하라고 스크립트 주석에 적어 놓았을 때만 사용합니다.
스크립트에 적혀있는것중 질문이가 하신 영어라는건 아마 주석정도로 생각 되는데 주석의 경우 스크립트 이용자나 스크립터가 사용할때 편의성과 가독성을 주기 위한 것일뿐이므로 한글로 바꾸실 필요가 없습니다
다만 어떤 특정 문구를 출력하는데 그것을 한글로 바꾸고 싶다 하면 바꿔야 겠지만요
질문이가 올린 스크립트는 기차스크립트와 전혀 상관이 없는 vx에 들어가있는 기본 스크립트로 보여집니다
4.스크립트는 똑같은 기능을 하더라도 스크립트를 짜는 스크립터에 따라 천지만별로 다릅니다.해당 스크립트를 찾아가지고 오면 대답해 드리죠