Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Give all heros full hp, even if not in the party

hello, im just starting with rmxp's ruby scripiting language and i have been getting along fine with it except for a question i have.

What would be the code to heal all heros to their full hp, not just the ones currently in the party?

Any help would be greatly apprieciated
Thanks
 
Use this code

Code:
# Run Through as many times as there are actors defined
$data_actors.each_index do |actor_id|
  # Skip if 0
  next if actor_id == 0
  # Actor Recover All
  $game_actors[actor_id].recover_all
end

Do note that this code will create each Game_Actor object since if the Game_Actor Object isn't defined within the Game_Actors class it creates it automatically.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top