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.

[Resolved] Party Member 1

Status
Not open for further replies.

Mac

Member

Whats the variable for the top member in your party? Because i want to make an if statement in which, if a member 1 in your database is the 1st party member something will happen and if member 2 was the 1st party member something else.

I tried this but no such luck:-

Code:
      if $game_party.actors[1] == $data_actors[1]
 

Anonymous

Guest

First of all, the first actor in your party is $game_party.actors[0]. Secondly, $data_actors is an array of RPG::Actor objects, and $game_party.actors is an array of Game_Actor objects, so of course they're not going to be equal to each other.

You could check to see if the actor name is something, for example:

if $game_party.actors[0].name == "Aluxes"

or even if the two object's names are the same:

$game_party.actors[0].name == $data_actors[1].name
 

Mac

Member

Oh wait my mistake, i actually had $game_actors anyway, i just typed it up wrongly, i found out what was wrong...i had something that was an entirely defferent if statement under it, so its all good :)

Resolved!

PS Thanks guys anyway
 
Status
Not open for further replies.

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