Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 22/04/2003 01:09:01

Title: How to pause game with Spacebar??
Post by: on Tue 22/04/2003 01:09:01
Hi!
This is my first message here it's kind stupid but I couldn't find out this by anywhere else so I'm turning to this poll to help to solve my problem.
How can pause my game using the spacebar like in the classic LucasArts adventures?? ???
Title: Re:How to pause game with Spacebar??
Post by: BlackBaron on Tue 22/04/2003 01:26:50
I'm trying to do an interface similar (actually as similar as posible) to that of Indy Jones and the Fate of Atlantis, so I'm probably gonna try to do that soon (surely before the en of the week).
It doens't seem to be a hard thing to do, so as soon as I do it I'll post it here.
Title: Re:How to pause game with Spacebar??
Post by: Scummbuddy on Tue 22/04/2003 04:19:03
This is what mine is in my global script.

Under function on_key_press(int keycode)
---------------------------------------
 if (IsKeyPressed(32)==1)
   {
      if (IsGamePaused()==0)
       {
            PauseGame();
         GUIOn(5);
         DisableInterface();
       }
    else
       {
            UnPauseGame();
         GUIOff(5);
          EnableInterface();
         }
      }
------------------------------
Title: Re:How to pause game with Spacebar??
Post by: BlackBaron on Tue 22/04/2003 06:50:33
Well, thanks a lot, you saved me the job of figuring that out  ;D
Title: Re:How to pause game with Spacebar??
Post by: on Tue 22/04/2003 18:56:58
Thanks a lot Scummbuddy :) !!
Another thing... Does anybody have a GUI to a LucasArts Load/Save menu?????
I know this is kinda lazy of me but I tried do create one and didn't worked at all!! The only thing that happened was that my game stopped working....