[XP][RESOLVED] Actor/Character party position conditional branch

Started by Xero, January 08, 2011, 12:59:28 am

Previous topic - Next topic

Xero

Hi so um, One thing, I'm kinda not sure what to call it so I called it that. This is my first post so go easy on me guys :)

What I mean is I want to be able to have the ability to make a conditional branch that says "If actor is in the first position of the party, do (insert event here). Unfortunately there are no commands in the conditional branch that specify a character's position in the party. It only has "If actor is in the party, do (this event)"

So um, could someone please send me a code snippet that gives me the ability to create a conditional branch using a script call (or whatever it's called) that says "if actor(x) is in position [y], do (event)"

I hope I am being very clear...also:
Thanks in advance! :D
This just looks to sick!

ForeverZer0

@three:

Try this:
if $game_party.actors[POSITION].id == ACTOR_ID


The position is the place in the party you are looking for the actor at. Remember it is 0 based, so the first actor has a position of 0, second is 1, etc, etc.

Set ACTOR_ID to the ID of the actor you are checking for.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Starrodkirby86

Quote from: ForeverZer0 on January 08, 2011, 01:15:22 am
@three:

Try this:
if $game_party.actors[POSITION].id == ACTOR_ID


The position is the place in the party you are looking for the actor at. Remember it is 0 based, so the first actor has a position of 0, second is 1, etc, etc.

Set ACTOR_ID to the ID of the actor you are checking for.


Since he's going to use a Conditional Branch for it, the "if" would be redundant.

So... This would be what you would need to insert inside the Script section for Conditional Branch.


$game_party.actors[POSITION].id == ACTOR_ID



Also,

QuoteOnly Mastah calls me Three ;3


<3

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Xero

January 08, 2011, 07:45:57 am #3 Last Edit: January 08, 2011, 02:04:33 pm by Starrodkirby86
Yes!! Thanks guys! :)

Question though. Will I need to plug in the if statement into a script or could I immediately use it in the script section of the conditional branch?

EDIT: Never mind the above! It works! Thanks Starrodkirby86 and Mastah ;3

Just doing some forum cleanup, don't mind me. Don't double post if you something else to say! Edit your post instead. Double posts should be OK if 24 hours pass though. ~Love, Starrodkirby86
This just looks to sick!