插入main以上
設定設好之後就行了
[pre lang="ruby" line="1"]module Panda
U_VAR = 1 #使用變量
ACT = 1#几號隊員回血?
end
class Scene_Map < Scene_Base
def update
super
$game_map.update(true)
$game_player.update
$game_timer.update
@spriteset.update
if $game_variables[Panda::U_VAR]> 0
$game_actors[Panda::ACT].hp += 1
$game_variables[Panda::U_VAR] -= 1
end
update_scene if scene_change_ok?
end
end[/pre]