Hi there,
I'm trying to count how many enemies are, for example, inside a jail, in a particular zone.
The problem I have is that when several enemies enter that zone at the same time, only one of them is counted by the program. I have this logic right now:
If enemy is overlapping jail sensor (covering all the floor) TRIGGER ONCE ==== add 1 to jailenemycount (global variable).
That didn't work, so I tried:
If enemy is overlapping jail sensor and enemy's instance variable "countthisone" = 0 ====== set countthisone to 1
and then, when enemy's countthisone = 1 ====== add 1 to jailenemycount and set countthisone to 0
I'm missing something here. Any help will be very welcome.
Thank you in advance!