Post new topic    
Liquid Metal Slime
Send private message
On Keypress issue 
 PostTue Jan 05, 2010 6:20 pm
Send private message Reply with quote
I have the escape key set up to end the game when you press it. For some reason though, it sometimes shows the general in-game menu before it ends the game. I'm not sure how to fix it, but it is annoying the crap out of me.

Here's part of the script:

Code:
   while (playing) do(
      if (key is pressed (key:esc)) then (
           playing := false
        )

Cornbread Chemist
Liquid Metal King Slime
Send private message
 
 PostTue Jan 05, 2010 7:52 pm
Send private message Reply with quote
If you have not done "suspend player" and the player presses the key during some "wait" command somewhere else in the script, I would expect the menu to pop up.

I really need to add an easy way to override the menu behavior without also suspending the other player controls.
Liquid Metal Slime
Send private message
 
 PostTue Jan 05, 2010 8:34 pm
Send private message Reply with quote
I see. I added a suspend player before the variable change and it looks like that is doing the trick for now. Thanks.
Cornbread Chemist
Display posts from previous: