- 注册时间
- 2008-2-19
- 最后登录
- 2019-5-19
⑥精研
●~ ●~ ●
- 积分
- 1635
|
楼主 |
发表于 2010-1-13 10:56:05
|
显示全部楼层
原脚本是这样的
class Game_Player
attr_accessor :move_speed
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias old_update update
def update
unless $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
if Kboard.trigger?($R_Key_D)
if @move_speed != 6
@move_speed = 6
move_route = RPG::MoveRoute.new
move_route.repeat = false
move_route.list.clear
move_command = RPG::MoveCommand.new
move_command.code = @direction / 2
5.times{move_route.list.push(move_command.clone)}
move_command.code = 0
move_route.list.push(move_command)
force_move_route(move_route)
for i in 1..20
x = $game_variables[7]
y = $game_variables[8]
x1 = $game_map.events.x - x
y1 = $game_map.events.y - y
d = $game_player.direction
new_x = (d == 6 ? 6 : d == 4 ? -6 : 0)
new_y = (d == 2 ? 6 : d == 8 ? -6 : 0)
if (x1 <= 0 && x1 >= new_x && y1 <= 0 && y1 >= new_y) ||
(x1 >= 0 && x1 <= new_x && y1 >= 0 && y1 <= new_y)
$game_map.events.through = true
else
$game_map.events.through = false
end
end
@character_name_run = @character_name
@character_name = @character_name
Audio.se_play("Audio/SE/"+"013-Move01",80,100)
$game_temp.common_event_id = 50
end
else
for i in 1..20
$game_self_switches[[$game_map.map_id,i,"E"]] = false
end
if @move_speed != $game_party.actors[0].agi/300.0 + $game_party.actors[0].dex/600.0 + 2.5
@move_speed = $game_party.actors[0].agi/300.0 + $game_party.actors[0].dex/600.0 + 2.5
@character_name = @character_name_run
end
end
end
old_update
if @move_route_forcing
if not @move_route.skippable and not moving? and not jumping?
@move_route_index = @move_route.list.size - 1
return
end
end
end
def refresh_start
@character_name_run = @character_name
end
end |
|