Chaos Project

RPG Maker => General Discussion => Troubleshooting / Help => Topic started by: DarK_Camper on March 09, 2014, 05:39:26 am

Title: How to check who is the party leader?
Post by: DarK_Camper on March 09, 2014, 05:39:26 am
Hello I am using RMXP, and I would like to know how to check who is the current party leader.

I am using Blizzard ABS if that does indeed change anything. I most likely do not have any other script that modifies the default classes for what I am looking for that I am aware of.

I will be using this to create a button that will do something unique when you're using him/her. Unfortunately I dug through the default scripts, googled it, searched through this forum a bit(I apologize if this was already resolved before) but surprisingly I could not find anything. :\

Thank you for your answer in advance!
Title: Re: How to check who is the party leader?
Post by: KK20 on March 09, 2014, 07:30:05 am
$game_party.actors[0]

will give you the Actor class of the first actor in the party. From there, you should evaluate its ID and make a series of conditional branches.
Conditional Branch: $game_party.actors[0].id == 1
  # Aluxes special
Branch end
Conditional Branch: $game_party.actors[0].id == 2
  # Basil special
Branch end
Title: Re: How to check who is the party leader?
Post by: DarK_Camper on March 15, 2014, 08:04:32 am
@KK20
Thank you. I've been racking my brains figuring out what the array did.. when i tried printing an element it showed a hexadecimal so I was lost.

Thanks!