Ok, heres the script in question. I was thinking my problem might be soluble by modifying a basic XP script, so I held off on posting this.
# ?????Main???????????????????????
# ????????????require??????????
# ????????????????????????????????
# ???????????????????????????????????
# ????????????????????????????
# ????????????????????????????????
# ????????????????????????????????????
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ? ??
#--------------------------------------------------------------------------
TOP_SPACE = BOTTOM_SPACE = 16 # ?????????
LEFT_SPACE = RIGHT_SPACE = 16 # ?????????
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_accessor :dot_moving # ?????????nil:?????????? 0:???????
#--------------------------------------------------------------------------
# ? ???
#--------------------------------------------------------------------------
def initialize
super
# ???????????????
@dot_moving = 0
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def moving?(by_update = false)
# ??????update???????????????
if !by_update and @dot_moving
# ??????????????
return @dot_moving != 0
else
# ??????????????????????????????
return (!@dot_moving and (@real_x != @x * 128 or @real_y != @y * 128))
end
end
#--------------------------------------------------------------------------
# ? ????????
# move_route : ????????
#--------------------------------------------------------------------------
def force_move_route(move_route)
# ???????
@dot_moving = 0
super(move_route)
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????????
last_real_x, last_real_y = @real_x, @real_y
last_x, last_y = @x, @y
# ?????????????????
last_moving = moving?(true)
# ?????????????????????
# ???????????????????????
unless moving?(true) or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
# ?????
dot_move(Input.dir4)
end
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?(true)
# ???????????????????????????????????
if last_x != @x or last_y != @y or (!@dot_moving and 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
# ?????????????
else
# ??????????????????????
@dot_moving = @dot_moving ? 0 : nil
end
end
# C ??????????
if Input.trigger?(Input::C)
# ?????????????????
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
end
#--------------------------------------------------------------------------
# ? ????? : ????
#--------------------------------------------------------------------------
def move_type_custom
# ??????????
if jumping? or moving?
return
end
# ???????????????????????
while @move_route_index < @move_route.list.size
# ?????????
command = @move_route.list[@move_route_index]
# ??????? 0 ? (??????) ???
if command.code == 0
# ????? [???????] ? ON ???
if @move_route.repeat
# ??????????????????
@move_route_index = 0
end
# ????? [???????] ? OFF ???
unless @move_route.repeat
# ???????????
if @move_route_forcing and not @move_route.repeat
# ???????????
@move_route_forcing = false
# ??????????????
@move_route = @original_move_route
@move_route_index = @original_move_route_index
@original_move_route = nil
end
# ??????????
@stop_count = 0
end
return
end
# ??????? (?????????) ???
if command.code <= 14
# ?????????
@dot_moving = nil
# ??????????
case command.code
when 1 # ????
move_down
when 2 # ????
move_left
when 3 # ????
move_right
when 4 # ????
move_up
when 5 # ?????
move_lower_left
when 6 # ?????
move_lower_right
when 7 # ?????
move_upper_left
when 8 # ?????
move_upper_right
when 9 # ???????
move_random
when 10 # ?????????
move_toward_player
when 11 # ???????????
move_away_from_player
when 12 # ????
move_forward
when 13 # ????
move_backward
when 14 # ????
jump(command.parameters[0], command.parameters[1])
end
# ????? [???????????] ? OFF ?????????
if not @move_route.skippable and not moving? and not jumping?
return
end
@move_route_index += 1
return
end
# ???????
if command.code == 15
# ???????????
@wait_count = command.parameters[0] * 2 - 1
@move_route_index += 1
return
end
# ?????????????
if command.code >= 16 and command.code <= 26
# ??????????
case command.code
when 16 # ????
turn_down
when 17 # ????
turn_left
when 18 # ????
turn_right
when 19 # ????
turn_up
when 20 # ?? 90 ???
turn_right_90
when 21 # ?? 90 ???
turn_left_90
when 22 # 180 ???
turn_180
when 23 # ???? 90 ???
turn_right_or_left_90
when 24 # ?????????
turn_random
when 25 # ??????????
turn_toward_player
when 26 # ??????????
turn_away_from_player
end
@move_route_index += 1
return
end
# ???????????
if command.code >= 27
# ??????????
case command.code
when 27 # ???? ON
$game_switches[command.parameters[0]] = true
$game_map.need_refresh = true
when 28 # ???? OFF
$game_switches[command.parameters[0]] = false
$game_map.need_refresh = true
when 29 # ???????
@move_speed = command.parameters[0]
when 30 # ???????
@move_frequency = command.parameters[0]
when 31 # ?????? ON
@walk_anime = true
when 32 # ?????? OFF
@walk_anime = false
when 33 # ?????? ON
@step_anime = true
when 34 # ?????? OFF
@step_anime = false
when 35 # ???? ON
@direction_fix = true
when 36 # ???? OFF
@direction_fix = false
when 37 # ???? ON
@through = true
when 38 # ???? OFF
@through = false
when 39 # ?????? ON
@always_on_top = true
when 40 # ?????? OFF
@always_on_top = false
when 41 # ????????
@tile_id = 0
@character_name = command.parameters[0]
@character_hue = command.parameters[1]
if @original_direction != command.parameters[2]
@direction = command.parameters[2]
@original_direction = @direction
@prelock_direction = 0
end
if @original_pattern != command.parameters[3]
@pattern = command.parameters[3]
@original_pattern = @pattern
end
when 42 # ???????
@opacity = command.parameters[0]
when 43 # ???????
@blend_type = command.parameters[0]
when 44 # SE ???
$game_system.se_play(command.parameters[0])
when 45 # ?????
result = eval(command.parameters[0])
end
@move_route_index += 1
end
end
end
#--------------------------------------------------------------------------
# ? ?????? (??)
#--------------------------------------------------------------------------
def update_move
# ?????????????????
unless @dot_moving
# ?????????????????????
distance = 2 ** @move_speed
# ??????????????
if @y * 128 > @real_y
# ????
@real_y = [@real_y + distance, @y * 128].min
end
# ??????????????
if @x * 128 < @real_x
# ????
@real_x = [@real_x - distance, @x * 128].max
end
# ??????????????
if @x * 128 > @real_x
# ????
@real_x = [@real_x + distance, @x * 128].min
end
# ??????????????
if @y * 128 < @real_y
# ????
@real_y = [@real_y - distance, @y * 128].max
end
end
# ??????? ON ???
if @walk_anime
# ???????? 1.5 ???
@anime_count += 1.5
# ??????? OFF ????????? ON ???
elsif @step_anime
# ???????? 1 ???
@anime_count += 1
end
end
#--------------------------------------------------------------------------
# ? ?????????
# dir : ???0,2,4,6,8?
#--------------------------------------------------------------------------
def dot_move(dir)
@dot_moving = dir
# ???????????????????????????
if dir == 0 or !dir
return
end
# ?????
last_real_x, last_real_y = @real_x, @real_y
last_x, last_y = @x, @y
# ?????????????????????
distance = 2 ** @move_speed
# ????????????????????
case dir
when 2
turn_down
@real_y += distance
dx, dy = 0, 1
x1, y1 = @real_x + LEFT_SPACE, @real_y + 127 - BOTTOM_SPACE
x2, y2 = @real_x + 127 - RIGHT_SPACE, y1
when 4
turn_left
@real_x -= distance
dx, dy = -1, 0
x1, y1 = @real_x + LEFT_SPACE, @real_y + TOP_SPACE
x2, y2 = x1, @real_y + 127 - BOTTOM_SPACE
when 6
turn_right
@real_x += distance
dx, dy = 1, 0
x1, y1 = @real_x + 127 - RIGHT_SPACE, @real_y + TOP_SPACE
x2, y2 = x1, @real_y + 127 - BOTTOM_SPACE
when 8
turn_up
@real_y -= distance
dx, dy = 0, -1
x1, y1 = @real_x + LEFT_SPACE, @real_y + TOP_SPACE
x2, y2 = @real_x + 127 - RIGHT_SPACE, y1
end
# ????????????????????????????
if (x1 / 128 != @x or y1 / 128 != @y) and (x2 / 128 != @x or y2 / 128 != @y)
# ???????????????????
@x, @y = x1 / 128 - dx, y1 / 128 - dy
pass1 = passable?(@x, @y, dir)
@x, @y = x2 / 128 - dx, y2 / 128 - dy
pass2 = passable?(@x, @y, dir)
# ???????
@x, @y = last_x, last_y
# ???????
if pass1 and pass2
# ?????????
@x, @y = (@real_x + 64) / 128, (@real_y + 64) / 128
# ?????????????
if last_x != @x or last_y != @y
increase_steps
end
# ????????
else
# ?????
@dot_moving = 0
# ????????
case dir
when 2
@real_y = [(last_real_y + 64) / 128 * 128, last_real_y].max
# ??????????
if @real_x / 128 < @x
# ???????????
x1, x2 = x2, x1
end
when 4
@real_x = [(last_real_x + 64) / 128 * 128, last_real_x].min
# ??????????
if @real_y / 128 < @y
# ???????????
y1, y2 = y2, y1
end
when 6
@real_x = [(last_real_x + 64) / 128 * 128, last_real_x].max
# ??????????
if @real_y / 128 < @y
# ???????????
y1, y2 = y2, y1
end
when 8
@real_y = [(last_real_y + 64) / 128 * 128, last_real_y].min
# ??????????
if @real_x / 128 < @x
# ???????????
x1, x2 = x2, x1
end
end
# ???????????????????????????
check_event_trigger_touch(x1 / 128, y1 / 128) or
check_event_trigger_touch(x2 / 128, y2 / 128)
end
end
end
end
class Scene_Map
def update
# ???
loop do
# ?????????????????????
# (??????????????????????????????
# ???????????????????????????)
$game_map.update
$game_system.map_interpreter.update
$game_player.update
# ???? (????)??????
$game_system.update
$game_screen.update
# ??????????????????????
unless $game_temp.player_transferring
break
end
# ???????
transfer_player
# ????????????????????
if $game_temp.transition_processing
break
end
end
# ???????????
@spriteset.update
# ?????????????
@message_window.update
# ??????????
if $game_temp.gameover
# ??????????????
$scene = Scene_Gameover.new
return
end
# ???????????
if $game_temp.to_title
# ???????????
$scene = Scene_Title.new
return
end
# ?????????????
if $game_temp.transition_processing
# ?????????????????
$game_temp.transition_processing = false
# ?????????
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
# ????????????????
if $game_temp.message_window_showing
return
end
# ?????? ????? 0 ???????????????????
if $game_player.encounter_count == 0 and $game_map.encounter_list != []
# ??????????????????????
unless $game_system.map_interpreter.running? or
$game_system.encounter_disabled
# ???????
n = rand($game_map.encounter_list.size)
troop_id = $game_map.encounter_list[n]
# ?????????
if $data_troops[troop_id] != nil
# ??????????????
$game_temp.battle_calling = true
$game_temp.battle_troop_id = troop_id
$game_temp.battle_can_escape = true
$game_temp.battle_can_lose = false
$game_temp.battle_proc = nil
end
end
end
# B ??????????
if Input.trigger?(Input::B)
# ????????????????????
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
# ???????????? SE ?????????
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
# ???????? ON ?? F9 ???????????
if $DEBUG and Input.press?(Input::F9)
# ???????????????
$game_temp.debug_calling = true
end
# ??????????????????????????
unless !$game_player.dot_moving and $game_player.moving?
# ????????????
if $game_temp.battle_calling
call_battle
elsif $game_temp.shop_calling
call_shop
elsif $game_temp.name_calling
call_name
elsif $game_temp.menu_calling
call_menu
elsif $game_temp.save_calling
call_save
elsif $game_temp.debug_calling
call_debug
end
end
end
end