赞 | 0 |
VIP | 0 |
好人卡 | 7 |
积分 | 1 |
经验 | 43463 |
最后登录 | 2017-9-10 |
在线时间 | 1019 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1019 小时
- 注册时间
- 2012-4-25
- 帖子
- 799
|
Sion 发表于 2013-6-14 20:47
全体玩家是$game_party.all_members, 战斗中的全体 $game_party.battle_members, 这些对象都是包含在数组 ...
其实我是根据P叔的脚本修改,想做一个类似物品的光环效果,只要角色在场上且装备了某物品,就自动附加状态,但是判断语句搞错了,直接单角色附加状态也无效。- def auto_state_by_equips
- if $game_party.battle_members.include?($game_actors[4]) #$game_actors[4].in_battle=====》这个也无效
- if $game_actors[4].armors.include?($data_armors[488])
- $game_party.battle_members.each {|member| member.add_new_state(260)}
- $game_party.battle_members.each {|member| member.erase_state(261)}
- $game_party.battle_members.each {|member| member.erase_state(262)}
- elsif $game_actors[4].armors.include?($data_armors[489])
- $game_party.battle_members.each {|member| member.add_new_state(261)}
- $game_party.battle_members.each {|member| member.erase_state(262)}
- $game_party.battle_members.each {|member| member.erase_state(263)}
- elsif $game_actors[4].armors.include?($data_armors[490])
- $game_party.battle_members.each {|member| member.add_new_state(262)}
- $game_party.battle_members.each {|member| member.erase_state(263)}
- $game_party.battle_members.each {|member| member.erase_state(260)}
- elsif $game_actors[4].armors.include?($data_armors[491])
- $game_party.battle_members.each {|member| member.add_new_state(263)}
- $game_party.battle_members.each {|member| member.erase_state(261)}
- $game_party.battle_members.each {|member| member.erase_state(260)}
- end
- elsif !$game_actors[4].in_battle or $game_actors[4].state?(1)
- $game_party.battle_members.each {|member| member.erase_state(260)}
- $game_party.battle_members.each {|member| member.erase_state(261)}
- $game_party.battle_members.each {|member| member.erase_state(262)}
- $game_party.battle_members.each {|member| member.erase_state(263)}
- end
- end
- end
复制代码 |
|