本帖最后由 76213585 于 2013-9-26 17:52 编辑
請原諒連帖.........
這個可以讓血量是一瞬間恢復的...... 不是一點一點加上去 血量很多的遊戲也不用擔心了
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 update_scene if scene_change_ok? @k = $game_actors[Panda::ACT].mhp - $game_actors[Panda::ACT].hp if $game_variables[Panda::U_VAR]> 0 if $game_variables[Panda::U_VAR]>= @k $game_variables[Panda::U_VAR] -= @k $game_actors[Panda::ACT].hp += @k end else if $game_variables[Panda::U_VAR]< @k $game_actors[Panda::ACT].hp += $game_variables[Panda::U_VAR] $game_variables[Panda::U_VAR] = 0 end end end end
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
update_scene if scene_change_ok?
@k = $game_actors[Panda::ACT].mhp - $game_actors[Panda::ACT].hp
if $game_variables[Panda::U_VAR]> 0
if $game_variables[Panda::U_VAR]>= @k
$game_variables[Panda::U_VAR] -= @k
$game_actors[Panda::ACT].hp += @k
end
else if $game_variables[Panda::U_VAR]< @k
$game_actors[Panda::ACT].hp += $game_variables[Panda::U_VAR]
$game_variables[Panda::U_VAR] = 0
end
end
end
end
|