Hello
I have a sprite called Bugs with a local variable called Player. The values for the local variable are 1, 2, 3 or 4.
I need to count how many of them have the variable set to 1, how many to 2 etc. and save that to global variables. I tried using compare variable and pickedcount like so:
- Bugs (variable) Player = 1 --> set 1x to Bugs.pickedcount
the "1x" is the global variable.
This works fine until the value is 0 - meaning there are no Bugs that have Player variable set to 1. I understand that if the condition isn't met the action isn't triggered and I will never get a 0 this way. But I really need that 0...
So, how can I count the number of Bugs objects that have their Player variable set to 1 and get that number even if it's 0?
Thank you :)