Only one button click [solved]

For questions about using Classic.

Post » Wed Jan 12, 2011 3:11 pm

I'm back to ask for assistance!

This one is pretty simple. I need to be able to bring up a menu on a button click and then close it again with that same button. One example is bringing up a menu with 'escape'. Another is bringing up a message box with 'enter' and then either proceed the message or close the box with another 'enter' press.

Thing is that this only works if I can press that button insanely fast, or the program will start it all over, and I'm stuck in my menu. The only thing I found on the forum about this was to try inputting "trigger once" as a condition, but this doesn't seem to make any difference for me. Not as a condition, and not as a sub-event.

I even tried inputting a "wait X ms" before the action is carried out, but that didn't work either!

There must be some way to work around this?
B
10
S
3
G
3
Posts: 110
Reputation: 2,206

Post » Wed Jan 12, 2011 3:36 pm

+ On esc pressed
+ + if variable 'menu' = 0
- - open menu code
- - set variable 'menu' to 1
+ + else
- - close menu code
- - set variable 'menu' to 0
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Wed Jan 12, 2011 4:23 pm

You know, suddenly I feel really dumb...

You see I already used that method one time before, but somehow it completely slipped my mind <_< Thanks for reminding me...
B
10
S
3
G
3
Posts: 110
Reputation: 2,206


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest