Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Ravenith on April 10, 2010, 02:27:07 pm

Title: [Resolved]Quick question - check who's the first char in party.
Post by: Ravenith on April 10, 2010, 02:27:07 pm
As the title implies, I'd like to know what line of script should I use in a conditional branch to check whether character X is the first character in the party.
Thank you very much!
Title: Re: Quick question - check who's the first char in party.
Post by: Aqua on April 10, 2010, 02:44:33 pm
if $game_party.actors[0] == $game_actors[1]

So if 1st actor is actor ID 1 (Default: Arshes), then...

Lol I hope I'm not so rusty in RGSS that I got it wrong XP
Title: Re: Quick question - check who's the first char in party.
Post by: Jackolas on April 10, 2010, 02:47:58 pm
edit: was about to type the same
Title: Re: Quick question - check who's the first char in party.
Post by: Ravenith on April 11, 2010, 01:13:32 pm
Thank you very much.

*Boosts*

edit: okay, i put that as a condition in a conditional branch, and when it's executed the game crashes with a syntax error... :(
Title: Re: Quick question - check who's the first char in party.
Post by: Hellfire Dragon on April 11, 2010, 01:29:20 pm
If you're using a conditional branch then just remove the 'if' part and it should work ;)

$game_party.actors[0] == $game_actors[1]
Title: Re: Quick question - check who's the first char in party.
Post by: Ravenith on April 11, 2010, 07:22:32 pm
Right... I feel pretty dumb right now...  :huh: Thanks!