[XP] Adding additional conditional branches

Started by monzdname, December 14, 2010, 09:01:03 pm

Previous topic - Next topic

monzdname


Is there a way a Condition will apply to the current party member displayed on the field (or map)?

Example, i have 3 party member named A, B and C.. We all know we can arrange them in the menu window to show whose character sprite will be displayed on maps (ie. when walking, interacting in towns...)

I'm looking for a condition wherein the event will be activated when a certain character is displayed on field map.

Example, A, B, C's in the party.. Now "A" is the 1st party member, so his character is displayed on field. And I'm going to make a parallel event (ie. @condition> when Y button is pressed) wherein if "C" is displayed on field, the event will take place.
If "A" is displayed on the field, the event would not function if Y button is pressed. But if i rearrange the party and put "C" as the 1st party member (making "C's" character display on the map), the event will take place when I press Y button

It functions the same way as "@Condition> actor "C"> in the party" but a little different because this condition applies even though you dont rearrange the party members

Well I hope you got the point.. And can help me with this..

I don't know if this can be done purely by eventing (using variables) or should a script able to do this (ie. @Condition> Script...)



Aqua

Conditional > Script

$game_party.actors[0].id == ID_OF_FIELD_PERSON
Change ID_OF_FIELD_PERSON to the id of actor A/B/C in your example

monzdname


wow thank you for that.
should i write the name of the character or just the number??
so i guess script should look like this

$game_party.actors[1] == ID__OF_FIELD_PERSON

or

$game_party.actors[C] == ID__OF_FIELD_PERSON


fjurio

December 15, 2010, 03:50:01 pm #3 Last Edit: December 15, 2010, 03:51:41 pm by fjurio
The number in the brackets is the position in the party. 0 is the first one, so you shouldn´t change this.
The ID of an actor is just the number, not the name. For example Aluxes has the ID 1. The Actor right after Aluxes in the database has the ID 2 and so on...

So your conditions should be like this:

$game_party.actors[0].id == 1    -> for the actor with the ID = 1

$game_party.actors[0].id == 2    -> for the actor with the ID = 2

and so on

I hope this will help.