Variable equal to number of party members

Hi people, I want to make a  variable equal to the numbers of party memebers,  example: If there is 2 party members then the variable is equal to 2, if there is 4 party memebers then the variable is equal to 4.
how i would do it is:


whenever a party member is added, set up a variable change before/after the block that adds the party member


same thing for removing a party member, when someone leave the party, do the same thing.


as for counting the original party member, make sure the variable starts out with one


there's probably a more simple way to do this but i dont really know much about scripting so
I usually use XP and I know you can do this there, so I opened an Ace project just to verify you still can. In the Control Variables event command, name your Variable, put the Operation as "Set," and in the Operand go under Game Data choose Other > Party Members.
I usually use XP and I know you can do this there, so I opened an Ace project just to verify you still can. In the Control Variables event command, name your Variable, put the Operation as "Set," and in the Operand go under Game Data choose Other > Party Members.

I was ignoring the option other thinking it was only for map ID lol... thank you dude

Original thread: https://forums.rpgmakerweb.com/threads/variable-equal-to-number-of-party-members.57767/