Hey good morning everyone. Quick question for you guys. I'd like to make an event occur when a specific party member is leading. How would I do this? 🙂
Events triggered when specific character is leading
RGSSx Script Supporthmmm... maybe:
https://himeworks.wordpress.com/2013/03/23/event-page-conditions/
for the conditional branch. choose script:
$game_party.leader.id == xchange x to your actor id.
hope this help
https://himeworks.wordpress.com/2013/03/23/event-page-conditions/
for the conditional branch. choose script:
$game_party.leader.id == xchange x to your actor id.
hope this help
If you want to try an approach that does not require an external script, you could try creating a parallel process event and enter the following script call in the 'Conditional Branch':
$game_party.members[0] == $game_actors[x]
where '0' is the position of an actor in the party (in this case, the party leader), and 'x' is the location of the actor in the database.
$game_party.members[0] == $game_actors[x]
where '0' is the position of an actor in the party (in this case, the party leader), and 'x' is the location of the actor in the database.
Make what event occur? Under what conditions? Just by being the leader? Does that mean the event will run constantly until the leader changes?
Thank you everyone 🙂 I will try it out after work.
And for example. Let's say there's a huge boulder that only your strongest party member break. The only way to break it is if this strong party member is the leader.
And for example. Let's say there's a huge boulder that only your strongest party member break. The only way to break it is if this strong party member is the leader.
this could work... but need some change to be able to used for event condition
set one common event. make it run at parallel process
in the common event page
use change variable event command > script:
$game_party.leader.idadd wait command (30 or 60) so it won't be lag
it will store the party leader id to variable you choose.
then in event huge boulder. use the variable condition (below the switch condition)... which will activate when that variable you set in common
event equal to certain value. done without script 😀 . so you can create huge boulder that can be only pushed by certain member in leader position.
edit: sorry but i think i'm wrong. variable event condition only support variable equal to x or above. i think it's like the conditional branch before 😀 . silly me.
If that example is exactly what you want to do, you don't need to use a script OR a parallel process event.
Just put a Conditional Branch on the event to check who the leader is, and put your code in the If and the Else blocks depending on whether the required person is the leader or not.
I don't know if the Conditional Branch allows you to check who is in what position (or if Control Variables lets you put the leader's id into a variable which you can then use in a conditional branch) - I don't have my computer in front of me right now. If you can't find a way, use this:
Conditional Branch: Script: $game_party.leader.id == Xwhere X is the actor id of the person you're interested in (Actor 1 will be 1 - don't use leading zeros)
But if you want the event to be visible all the time and only react a certain way if a certain person is the leader, do all the processing within the event. Don't use scripts and parallel processes to check something continually, when you have an exact point in time when you need that information.
Just put a Conditional Branch on the event to check who the leader is, and put your code in the If and the Else blocks depending on whether the required person is the leader or not.
I don't know if the Conditional Branch allows you to check who is in what position (or if Control Variables lets you put the leader's id into a variable which you can then use in a conditional branch) - I don't have my computer in front of me right now. If you can't find a way, use this:
Conditional Branch: Script: $game_party.leader.id == Xwhere X is the actor id of the person you're interested in (Actor 1 will be 1 - don't use leading zeros)
But if you want the event to be visible all the time and only react a certain way if a certain person is the leader, do all the processing within the event. Don't use scripts and parallel processes to check something continually, when you have an exact point in time when you need that information.
yeah this is the right way 😀 . just put the 'right leader event set' in the conditional branch with else 'wrong leader event set'
why do i think the hard way 😀 . nice one.
if you want the graphic to change (even without the event activated) then you might need the script.
ex: there's a hidden item that can be seen when placing a 'thief' actor as leader.
Shaz's explanation provides the most concise script call that can be used for this checking the party leader.
I agree with Shaz that the conditional branch should be placed within the event itself if you are trying to achieve what was written in your example.
The same script call that Shaz provided can be used within a parallel process if needed, and can still achieve the example given by estriole even without an external script.
In the end, it depends on you regarding whichever method you wish to use, and how you adjust it according to your needs. ^^
I agree with Shaz that the conditional branch should be placed within the event itself if you are trying to achieve what was written in your example.
The same script call that Shaz provided can be used within a parallel process if needed, and can still achieve the example given by estriole even without an external script.
In the end, it depends on you regarding whichever method you wish to use, and how you adjust it according to your needs. ^^
Perfect thank you Shaz it works perfectly! 🙂
Thank you everyone for your input 🙂
Thank you everyone for your input 🙂
Original thread: https://forums.rpgmakerweb.com/threads/events-triggered-when-specific-character-is-leading.38200/