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.

Party Member Syntax help

Alrighty, I'm sort of new to scripting, but I'm taking a hand at it. I've been doing ok, but I ran into a wall. I need to check a few things.

1. How do I find out how many people are in the party? I have an idea on how to make something support any party size, but I'd need to use a while loop based on the number of party members.

2. How do I check (in code) a specified party member (by position index)'s HP and status? I've looked through the help file, but I can't get the syntax correct, I must be missing something.

If you could help, that would be great, I could get the script finished.
 
$game_party.actors.size

$game_party.actors[0].hp

$game_party.actors[0].states will return an array of states that are ON. "nil" means it's empty...

if $game_party.actors[0].states == nil
  # whatever
end
 

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