Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Scummbuddy on Wed 18/06/2003 16:36:10

Title: Gui Freezing on screen problem
Post by: Scummbuddy on Wed 18/06/2003 16:36:10
My Gui is supposed to pop up, asking if the user would like to [automatically] win.

It pops up just fine, but then it freezes. No buttons will respond, and I can't quit the game, so I have to Crtl Alt Del the thing.


Here it is:


under
function on_key_press(int keycode)
I have:
if (keycode==23) GUIOn(WIN); // Ctrl + W -- Automatically win game
if (IsGUIOn(WIN))
  {
     if (keycode==89)
     {
        NewRoom(1);//winning room
        GUIOff(WIN);
     }
     if (keycode==78) GUIOff(WIN);
  }


I shouldnt have to move the last nested function to rep.execute function, do I?
I'm using the beta version 2.56, by the way.
Title: I cant download the templates
Post by: CiacioZ on Wed 18/06/2003 20:32:36
Hi to all, unfortunately I cant download the templates so could someone post them to me by email?

My address is s.casotti@fastpiu.it

Greetings CiacioZ
Title: Re:Gui Freezing on screen problem
Post by: Scummbuddy on Thu 19/06/2003 08:22:35
Wow... thats... really helpful.  Thank you for that insight....

Seriously... good luck getting your downloads... If someone does send them, reply with a post so everyone doesn't flood his email... but we'd need to know which ones he would like.
Title: Re:Gui Freezing on screen problem
Post by: Proskrito on Thu 19/06/2003 09:39:36
if the gui is in popup mode, do you have a part in the on_key_press at the beggining that reads "if (IsGamePaused()==1) keycode==0"??
if you have your code below that, try putting it upon that. Its the only think i can think of :-\
Title: Re:Gui Freezing on screen problem
Post by: CiacioZ on Thu 19/06/2003 10:37:19
Quote from: Scummbuddy on Thu 19/06/2003 08:22:35
Seriously... good luck getting your downloads... If someone does send them, reply with a post so everyone doesn't flood his email... but we'd need to know which ones he would like.

I like to take a look to all the lucas template so if someone could send them to me, thanks a lot again ;)
Title: Terrible mistake
Post by: CiacioZ on Thu 19/06/2003 14:01:49
Someone notice to me that this is not the right place to reply about the MI2 templates...sorry I read the right thread but do a terrible mistake when I was trying to reply so apologise me.

Sorry for the mistake, I'll take more attention in the future.

Greetings CiacioZ
Title: Re:Gui Freezing on screen problem
Post by: Scummbuddy on Thu 19/06/2003 17:26:07
Proskrito saves the day.  I hate how where you place the code matters, even though they are not nested functions.  I've had this problem before, but not the same way, so I didnt try it.  Thanks again.