Press X key and image becomes visible. Pres X again and image becomes invisible.
I found everything I need in the event section to make it however one problem arose. First of all there is no If_Else statement. So I decided to create a variable to “guard” the image condition while pressing X, however that did not work since other events relating to same key are been executed almost at the same time. I tired to group and to set event under another event, however did not succeed again, once parent event is false it never falls down to child event.
I’m new to the engine and just trying to figure out what it can do on the fly - I probably misunderstood how events been executed or called. How can I resolve this issue?
Hah, teach me for replying so late at night, I can’t even think straight. The first condition changes the visibility, and the second undoes it because it then becomes true in the same frame. Thanks for spotting that one, Jack
Yes that’s the issue with it it sends event response to both of them and when it done with first sub event, it deals with second having ALL the needed values for it to successfully meet conditions.
You need a variable to block that attempt. Now having understanding how this engine handles events I was able to come up with one variable solution and trigger once is crucial. It feels like it sends multiple events while trigger once made sure its only one time. Or may be it’s just my impressions Documentation did not help much regarding trigger once.
In any lovely case thank you for your “at the bed time” attempt to help much much appreciating!
Unfortunately what you have offered did not work at all, well if you move a few things it kinda works but not really
Followed your link, yeah I see people struggling with this since it’s not that intuitive on the fly regarding whats happening and without StepByStep debugger it’s hard to catch it.
Any way here is the solution for the keyboard and I believe it’s the same with touch and mouse in principle regarding clicking same buttons & images - should be part of the tutorial I think, people will try to imitate what they see is done in other games using full power of the code script without a doubt.
No, did not work, because pressing key event is sending “event” to each event that is listening for it and they sort of executing at the same time making whatever action of first event to simply be used for next event that is stored to be executed on the list
And while using X not being pressed as conditional guardian is interesting it just fails, because it never has a chance to outplay itself. Did not play further with this, I think you can restructure it this way using while key X is not pressed if it’s one time call event.
No worries tho, thank you for your time and trying to help me Appreciating this a lot.
P.S. I find it hilarious you used strings “no” “yes”