Project1
标题: 如何清除特定角色所有状态-包括永久状态清除 [打印本页]
作者: l734273398 时间: 2019-10-7 08:09
标题: 如何清除特定角色所有状态-包括永久状态清除
本帖最后由 l734273398 于 2019-10-7 11:58 编辑
如题:如何清除特定角色永久状态(永久状态比较多也不清楚具体是哪个),使其恢复到最初的正常状态,最好可以利用脚本直接在对话中清除所有状态
作者: KB.Driver 时间: 2019-10-7 10:04
actor = $game_actors[n] # n换成你角色的编号 比如阿尔西斯是1
actor.states = []
actor.hp = [1, actor.hp].max
actor = $game_actors[n] # n换成你角色的编号 比如阿尔西斯是1
actor.states = []
actor.hp = [1, actor.hp].max
作者: guoxiaomi 时间: 2019-10-7 11:37
最好使用:如果目的是清空全部状态,使用:
作者: KB.Driver 时间: 2019-10-7 12:08
先在脚本编辑器里新增一个空白页,插入这段
class Game_Battler
def clear_states
@states = []
self.hp = [1, self.hp].max
end
end
class Game_Battler
def clear_states
@states = []
self.hp = [1, self.hp].max
end
end
游戏里需要用时这样写
$game_actors[n].clear_states # n换成你角色的编号 比如阿尔西斯是1
$game_actors[n].clear_states # n换成你角色的编号 比如阿尔西斯是1
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |