I have objects with a ‘state’ variable. The state can be ‘inactive’, or a number of other values (‘active’, ‘falling’, ‘moving’, etc.). These objects are also on two different layers: ‘red’ and ‘orange’.
I need to setup an event that’ll trigger when there are no objects on the ‘red’ layer with the ‘inactive’ state variable. There may still be objects on the ‘red’ layer with other states, and there may be ‘inactive’ objects on the ‘orange’ layer.
Here’s what I have so far:
All objects are ‘inactive’. The red ones are on the ‘red’ layer and the orange one is on the ‘orange’ layer (genius, right?).
When you click on any object, it’ll turn green and the state changes to ‘active’. The idea is that once all red objects are green (i.e. no more ‘inactive’ objects on the ‘red’ layer) the text ‘Game over’ will appear.
However I can’t work out how to check the layer as well as the state. I thought putting them both in the NOT condition would do it, but apparently not (no pun intended).
Any ideas?