As the title says, when I left click my button the animation initiates, but I do NOT want to be able to spam-click and have the animation re-activate everytime I click until the menu is closed, how would I go about doing this?
For reference, when I click a button my “Options” menu pops up, I have a key to make it go away, but when the menu is on screen, I’m still able to click my Options Button and the animation for the menu starts up again, how do I stop it from doing this?
What I would use most of the time are variables, between key and mouse press and actions. These variable would keep the game state.
For example, clicking on option would set the boolean value “option” to true. Or a variable string “state of the game” to “option”.
So if option is on and I try to open menu, it doesn’t cause I would have set a condition that allow menu to open only of option is off.
Well I don’t know exactly what’s you’re pb, bit still to use variable between actions and effect allows a lot.
So while creating these variables would work, I’m not even sure how I would use them to NOT activate said animation, not initiating an animation doesn’t seem to exist as it’s own thing, I tried pausing the tween (because that’s what I’m using to animate it)
this does work, I can use variables in the events no issues, but how do I make the engine understand that optionson means that the options button cannot be pressed, however when optionsoff is there it means the button can be pressed?
What I suggested is to replace
Button pressed → animation
by
Button pressed → variables → animation
So for example you can say
If
- variable(optionpressed) is on
- variable(menuon) is off
Then → launch animation opening options
That’s an example. You see that if menuon is on or optionpressed is off, it won’t launch the animation.
Is that clearer?