Project1
标题:
求助。帮忙在这个脚本上加点东西
[打印本页]
作者:
zgm1100
时间:
2010-10-4 19:34
标题:
求助。帮忙在这个脚本上加点东西
帮忙在这个脚本上加个开关操作,还有每次按键减少一定量的SP,再加个移动时显示动画效果。
就想做个冒险岛法师的瞬移一样。谢谢!!
class Game_Player
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias old_update update
def update
unless $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
if Input.press?(Input::CTRL)
if moving?
if @move_speed != 6
@move_speed = 6
@character_name_run = @character_name
@character_name = @character_name + "run"
Audio.se_play("Audio/SE/"+"013-Move01",80,100)
end
end
else
if @move_speed != 4
@move_speed = 4
@character_name = @character_name_run
end
end
end
old_update
end
end
复制代码
作者:
IamI
时间:
2010-10-4 20:00
= =b 偶尔写点脚本骗点分
class Game_Player
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias old_update update
def update
unless $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
if Input.press?(Input::CTRL)
ac = $game_party.actors[0]
if ac.sp > 0
if Graphics.frame_count % 40 == 0
ac.sp -= 1
@animation_id = 1 if @animation_id == 0
end
if moving?
if @move_speed != 6
@move_speed = 6
@character_name_run = @character_name
@character_name = @character_name# + "run"
Audio.se_play("Audio/SE/"+"013-Move01",80,100)
end
end
else
if @move_speed != 4
@move_speed = 4
@character_name = @character_name_run
end
end
end
end
old_update
end
end
复制代码
注:其中
if ac.sp > 0
if Graphics.frame_count % 40 == 0
ac.sp -= 1
@animation_id = 2 if @animation_id == 0
end
复制代码
40为帧周期,每过40帧播放动画并扣领队的SP
2为动画ID
1为扣除的SP
作者:
火ZHI意志
时间:
2010-10-4 21:55
基本上这样的问题能解决…………不过貌似已经不想要了………………
作者:
zgm1100
时间:
2010-10-5 12:17
为什么按了CTRL键速度就增加了。。不减到原来的速度?
作者:
zgm1100
时间:
2010-10-5 12:55
还有。穿透是上面脚本里的那一段?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1