I have a conditional branch that states: if x is in the party. But I only want to check if x is the ONLY member of the party and if so then do something. Ideas?
Check if only ONE character is in the party?
RPG Maker MV SupportIn VX Ace the party size could be tracked with $game_party.members.size so you could set up a conditional branch with, for example, $game_party.members.size == 1
I'm less confident with my JavaScript, but a quick search through the MV script files did reveal a $gameParty.size() method, so I think you could run a conditional branch with $gameParty.size() === 1
I'm less confident with my JavaScript, but a quick search through the MV script files did reveal a $gameParty.size() method, so I think you could run a conditional branch with $gameParty.size() === 1
Ok but I need to know if character x is the only one in the party. Not just that the party is size one. The specific character matters here.
then you need to check two times.
It can even be done without scripts if you prefer that:
control variable : game data : party : mamber #1
will give you the ID of the first (or second, or third) actor in the party.
If the first actor is the one you want, and the second actor returns a zero (no ID), then you'll know that he's the only one.
It can even be done without scripts if you prefer that:
control variable : game data : party : mamber #1
will give you the ID of the first (or second, or third) actor in the party.
If the first actor is the one you want, and the second actor returns a zero (no ID), then you'll know that he's the only one.
You would check whether the actor is in the party AND whether there's only one member in the party using the solution wavelength suggests.
Here is a different approach, using the "Control Variables" command to store the party size in a variable and then checking that.
Cool Cool.
Original thread: https://forums.rpgmakerweb.com/threads/check-if-only-one-character-is-in-the-party.56697/