Ok so in my game each level has certain requirements to complete the level. I was giving the object that needed to be destroyed/collected an instance variable and when the count reached the appropriate amount trigger the function to call for the level win, but it won't call. Can this only be done with global variables?
I know that if I make a global variable for the same thing and pass the value into the global variable on destroy/collected instead of the instance, once the right amount has been hit it will trigger the function.
It just seems like that would be making a lot of global variables for each level complete requirement if there is always going to be a different requirement. Or am I missing a step when calling the function using an instance variable comparison?
what I'm using now for instance variable function call:
I do have it set to add to the instance variable here: