Hi.
Can someone tell me why the sprites are not destroyed when I hit the space bar?
https://www.dropbox.com/s/1rt29j5le6b6d4g/testKey.capx?dl=0
https://www.scirra.com/manual/75/how-events-work
Triggers are called outside of the C2 loop. Event 3 is NOT called right after the trigger. The flag is set to 1, then returns, so on the next loop, flag = 0 again, since it is a local variable.
Then these triggers are more suitable to contain the actions to be executed.
That is, it is advisable to use them like this:
Thanks for the info.
Develop games in your browser. Powerful, performant & highly capable.
Also, I recommend not putting them inside other events, for the same reason. Putting them as top events is the best solution, and will make live simpler. (Inside Groups is OK).