How do I block the button click on the second scene?

Hello everyone

There are three scenes in my project. From the first scene, I move between the others using the button. When I press the button on the first scene, the scene opens and the button that is located on this scene is immediately pressed. How can I block its pressing?

thanks.

Hello!

All events run every frame, so this is pretty common whenever you have events that check for a value and the state changes. In this case, the state that is changing is you’re changing scenes, so it immediately is checking for button clicks again.

You’ll want to dig into setting up a global variable as a toggle switch, and there’s some more info here:

2 Likes