Project1
标题:
如何令敌人静止不动
[打印本页]
作者:
番茄
时间:
2008-6-28 18:11
提示:
作者被禁止或删除 内容自动屏蔽
作者:
dbshy
时间:
2008-6-28 18:55
def update
# 跳跃中、移动中、停止中的分支
if jumping?
update_jump
elsif moving?
update_move
else
update_stop
end
# 动画计数超过最大值的情况下
# ※最大值等于基本值减去移动速度 * 1 的值
if @anime_count > 18 - @move_speed * 2
# 停止动画为 OFF 并且在停止中的情况下
if not @step_anime and @stop_count > 0
# 还原为原来的图形
@pattern = @original_pattern
# 停止动画为 ON 并且在移动中的情况下
else
# 更新图形
@pattern = (@pattern + 1) % 4
end
# 清除动画计数
@anime_count = 0
end
# 等待中的情况下
if @wait_count > 0
# 减少等待计数
@wait_count -= 1
return
end
# 强制移动路线的场合
if @move_route_forcing
# 自定义移动
move_type_custom
return
end
# 事件执行待机中并且为锁定状态的情况下
if @starting or lock?
# 不做规则移动
return
end
# 如果停止计数超过了一定的值(由移动频度算出)
if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
# 移动类型分支
case @move_type
when 1 # 随机
move_type_random
when 2 # 接近
move_type_toward_player
when 3 # 自定义
move_type_custom
end
end
end
用个IF判断一下 [LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
番茄
时间:
2008-6-28 18:59
提示:
作者被禁止或删除 内容自动屏蔽
作者:
jackxiao
时间:
2008-6-28 19:03
提示:
作者被禁止或删除 内容自动屏蔽
作者:
dbshy
时间:
2008-6-28 19:06
case @move_type
when 1 # 随机
move_type_random
when 2 # 接近
move_type_toward_player
when 3 # 自定义
move_type_custom
end
if $game_switches[id] then
move_type_random
end
你把$game_switches[id] = false 就不会动
作者:
番茄
时间:
2008-6-28 19:16
提示:
作者被禁止或删除 内容自动屏蔽
作者:
dbshy
时间:
2008-6-28 19:17
Game_Character中
作者:
番茄
时间:
2008-6-28 19:46
提示:
作者被禁止或删除 内容自动屏蔽
作者:
dbshy
时间:
2008-6-28 19:53
不是叫你换,是叫你改 = =b
我已经写了方法
作者:
番茄
时间:
2008-6-28 20:07
提示:
作者被禁止或删除 内容自动屏蔽
作者:
391395435
时间:
2008-6-28 20:10
提示:
作者被禁止或删除 内容自动屏蔽
作者:
番茄
时间:
2008-6-28 20:13
提示:
作者被禁止或删除 内容自动屏蔽
作者:
番茄
时间:
2008-6-28 20:15
提示:
作者被禁止或删除 内容自动屏蔽
作者:
391395435
时间:
2008-6-28 20:23
提示:
作者被禁止或删除 内容自动屏蔽
作者:
番茄
时间:
2008-6-28 20:32
提示:
作者被禁止或删除 内容自动屏蔽
作者:
番茄
时间:
2008-6-28 20:33
提示:
作者被禁止或删除 内容自动屏蔽
作者:
391395435
时间:
2008-6-28 23:10
提示:
作者被禁止或删除 内容自动屏蔽
作者:
番茄
时间:
2008-6-30 01:18
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1