In a menu for my game I have where you press Enter to select which menu you want to go into. It shows the proper layers and enables the proper event sheet. The problem is, as soon as the even sheet is enabled, Construct sees an Enter Key is Pressed event in the newly enabled event sheet and runs that event because it is all working in the same tick. What is the best way to prevent this?
Could try grouping things separately and toggling them on/off?
Hm, yeah, that could get tricky. You can use a global variable; when you press the Enter key, add to this variable and compare it in event sheet to make sure it hasn't already been pressed. That's the quick solution I thought of.
use a finite state machine instead of enabling-disabling groups.
There's a plugin for it now.
Develop games in your browser. Powerful, performant & highly capable.
use a finite state machine instead of enabling-disabling groups. There's a plugin for it now.
I was at first thinking of something like Mipey mentioned, but I'll definately look into the state machine thing.