Pause menu issue

For questions about using Classic.

Post » Tue Jan 14, 2014 4:46 am

Hi folks,

I've been trying out cc for a few days and I have been trying to make a pause menu.
I have it so on pressing esc it changes a global variable and have stuff happen based on it changing.

The problem I am having is the frst tme i press esc the pause menu flashes up for an instant then dissappears but the next time I press esc it works as intended. I hope I can get some help.


Thanks
B
2
Posts: 1
Reputation: 152

Post » Tue Jan 14, 2014 11:30 am

It's impossible to tell without the code at hand. Try to incorporate a timer which prevents closing the pause menu until after, say, 200 ms or so. This should fix whatever is wrong with it.

In pseudocode:

Esc pressed:
-> start timer
-> open pause menu

Timer is 200 ms or above AND Esc pressed:
-> close pause menu
B
11
S
2
G
3
Posts: 100
Reputation: 2,150


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests