Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Can someone tell me why the sprites are not destroyed when I hit the space bar?
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.
Develop games in your browser. Powerful, performant & highly capable.
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.
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).