Counting followers

Hi,


I'm wondering if it is possible to count the party followers aswell.


Right now I can only count the partysize, but not the actual followers.


For example: my partysize is 8 but only 3 of them are following the leade (active partymembers).


now i trigger an event (lets say a door) but it should only open if the number of my followers is 3.


I'm pretty sure its possible, and im trying to figure out how, but i hoped asking may lead me to this


a little bit faster 😉
I'm not that knowledgeable about eventing at the moment, but one way you could do it is keep track of the number of followers with a variable, then check that variable with a conditional branch. However, there's probably an easier way to do it.
"one way you could do it is keep track of the number of followers with a variable"

okay, but how do I do that? I mean i obviously need a script that counts the followers. But I don't know how to do that :-/
The easiest way to keep track with a variable is to set the variable whenever a new character joins the party or a character leaves. In whatever event that happens in, just use the Control Variable tool to add/subtract to a specific variable as needed. 


These two posts have more direct answers, no plugins required:


Post 1 


Post 2
There's an easier (lazier?) way.


Set a variable to this script snippet (or just use this script snippet somewhere)


It gets the current number of visible followers.

Code:
$gamePlayer._followers.visibleFollowers().length
Thank you guys / girls!


That's exactly what I was looking for!


🙂

I'm so happy seeing this finally working like intended!

Original thread: https://forums.rpgmakerweb.com/threads/counting-followers.68687/