Hi guys I'm having trouble with this.
I have multiple instances of the same sprite in my layout, they have a private variable that is set by random at the start of layout, the variable is either 0 or 1.
What I'm having a problem with is counting the number of the instances that have their private variable as 1 and setting a global variable to this number.
I have tried to use "count object matching events" but it only counts them by instance name what is the syntax for adding a check for a private variable as well.
Eg - 10 instances / 6 have the PV 1 / 4 have the PV 0
- Set global variable to 6
Or is there a better way of doing this.
Also the private variable can change too, so the global variable has to keep up to date.