Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://forums.rpgmakerweb.com/index.php?threads/vx-ace-need-help-with-cozziekuns-earthbound-scripts.138226/#post-1200040
- class Scene_Battle
- def update_odometer
- $game_party.members.each { |actor|
- if actor.odometer_hp != 0 or actor.odometer_mp != 0
- if actor.odometer_hp != 0 and Graphics.frame_count % Earthboundish::Odometer_Roll_Speed == 0
- damage = actor.odometer_hp > 0 ? 1 : - 1
- actor.hp -= damage
- actor.odometer_hp -= damage
- end
- if actor.odometer_mp != 0 and Graphics.frame_count % Earthboundish::Odometer_Roll_Speed == 0
- damage = actor.odometer_mp > 0 ? 1 : - 1
- actor.mp -= damage
- actor.odometer_mp -= damage
- end
- @status_window.refresh_hpmp(actor, actor.index)
- if actor.hp == 0 or (actor.hp == actor.mhp) and damage != nil
- damage = 0
- actor.odometer_hp = 0
- end
- if actor.mp == 0 or (actor.mp == actor.mmp) and damage != nil
- damage = 0
- actor.odometer_mp = 0
- end
- @status_window.refresh_hpmp(actor, actor.index)
- end
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement