Project1
标题:
战斗移位的”物理式“攻击法术怎么做
[打印本页]
作者:
jiahui5592986
时间:
2014-8-5 15:20
标题:
战斗移位的”物理式“攻击法术怎么做
用了战斗移位系统,怎么让角色使用A技能的时候,先移动,再显示动画,再移动回来。意思就是如何写:当A技能发动的时候,触发战斗移位效果
作者:
牛肉面
时间:
2014-8-5 16:13
虽然我不会,但你脚本也没发出来……
作者:
恐惧剑刃
时间:
2014-8-6 22:36
神思真移位??
如果是的话 找到 Scene_Battle 4 400行左右 刷新画面 (主回合步骤 3 : 行动方动画) 那里
把
if @active_battler.current_action.basic == 0 and
@active_battler.current_action.kind == 0
复制代码
改为
if (@active_battler.current_action.basic == 0 and
@active_battler.current_action.kind == 0) or
(@active_battler.current_action.kind == 1 and
[57, 61, 65].include?(@active_battler.current_action.skill_id))
复制代码
下方 修改后的 465行左右 找到 刷新画面 (主回合步骤 5 : 显示伤害)
类似的
条件改为
if @active_battler.current_action.basic == 0 and
@active_battler.current_action.kind == 0 or
(@active_battler.current_action.kind == 1 and
[57, 61, 65].include?(@active_battler.current_action.skill_id))
复制代码
这样当角色在发动 id 为 57 61 65的特技(默认的十字斩,扫荡,破坏力量)时
角色就会移位,当作物理技能处理
作者:
jiahui5592986
时间:
2014-8-6 22:56
恐惧剑刃 发表于 2014-8-6 22:36
神思真移位??
如果是的话 找到 Scene_Battle 4 400行左右 刷新画面 (主回合步骤 3 : 行动方动画) 那 ...
while @_move_duration > 0
Graphics.update
Input.update
@spriteset.update
tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
move(@active_battler, tag, ox, oy)
@_move_duration -= 1
end
复制代码
报错
作者:
恐惧剑刃
时间:
2014-8-6 23:02
你确定?放在Scene_Battle 4 以后
class Scene_Battle
#--------------------------------------------------------------------------
# ● 刷新画面 (主回合步骤 3 : 行动方动画)
#--------------------------------------------------------------------------
def update_phase4_step3
#========================================================================
#只是改了条件而已★★★★★★★★★★★★★
if (@active_battler.current_action.basic == 0 and
@active_battler.current_action.kind == 0) or
(@active_battler.current_action.kind == 1 and
[57, 61, 65].include?(@active_battler.current_action.skill_id))
#=============================★★★★★★★★★★★★★
@active_battler.startactive = "移动"
@_move_duration = Move_Duration
ox,oy = @active_battler.screen_x,@active_battler.screen_y
@oldxy = [@active_battler.screen_x,@active_battler.screen_y]
while @_move_duration > 0
Graphics.update
Input.update
@spriteset.update
tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
move(@active_battler, tag, ox, oy)
@_move_duration -= 1
end
@active_battler.startactive = "待机"
end
# 行动方动画 (ID 为 0 的情况下是白色闪烁)
if @animation1_id == 0
@active_battler.white_flash = true
else
@active_battler.animation_id = @animation1_id
@active_battler.animation_hit = true
end
for target in @target_battlers
target.animation_id = @animation2_id
target.animation_hit = (target.damage != "Miss")
end
# 移至步骤 4
@phase4_step = 4
end
#--------------------------------------------------------------------------
# ● 刷新画面 (主回合步骤 5 : 显示伤害)
#--------------------------------------------------------------------------
def update_phase4_step5
# 隐藏帮助窗口
@help_window.visible = false
#========================================================================
#只是改了条件而已★★★★★★★★★★★★★
if (@active_battler.current_action.basic == 0 and
@active_battler.current_action.kind == 0) or
(@active_battler.current_action.kind == 1 and
[57, 61, 65].include?(@active_battler.current_action.skill_id))
#=============================★★★★★★★★★★★★★
@active_battler.startactive = "返回"
@_move_duration = Move_Duration
ox,oy = @active_battler.screen_x - @active_battler.movex,\
@active_battler.screen_y - @active_battler.movey
while @_move_duration > 0
Graphics.update
Input.update
@spriteset.update
move(@active_battler, @oldxy, ox, oy, true)
@_move_duration -= 1
end
@active_battler.startactive = "待机"
end
@phase4_step = 6
return
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1