Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: beaver on Fri 30/04/2004 06:34:40

Title: GUIon?
Post by: beaver on Fri 30/04/2004 06:34:40
Hi, Im probably being really stupid, but how do i make a gui load when i click a button? is it done by using GUIon (number)? I tried that and i couldnt get it to work, could somebody please show me how to do this.

thanks.
Title: Re:GUIon?
Post by: Scummbuddy on Fri 30/04/2004 08:52:58
set that guis settings to "Popup modal". i think thats what you're missing.
Title: Re:GUIon?
Post by: Ashen on Fri 30/04/2004 17:18:36
Sorry if this sounds too obvious, but - make sure the button is set to 'Left Click: Run Script'. That's the bit I always forget.
Title: Re:GUIon?
Post by: Ishmael on Sat 01/05/2004 10:45:42
You wrote GUIon? It is GUIOn... AGS is case-sensitive.
Title: Re:GUIon?
Post by: beaver on Sat 01/05/2004 21:02:47
ok cheers for the help, i got it working now...
Ive just tried to make it turn off using GUIOff, but it only seems to work if i have another command before the GUIOff command.
below is what id imagine would work but doesnt.

 if (interface == MAP) {
   if (button == 1)
   GUIOff(7);
     }

here is what does work

 if (interface == MAP) {
   if (button == 1)
   SetButtonPic(MAP, 0, 1, 2060);
   GUIOff(7);
     }

any ideas why that is?

Title: Re:GUIon?
Post by: Ishmael on Sat 01/05/2004 21:12:32
Because the button is not GUI object number 1. Click on the button and check the number shown in the floating protopies window's caption.
Title: Re:GUIon?
Post by: beaver on Sat 01/05/2004 21:18:04
ehhe, thanks. i forgot counting started at 0 and not 1 =)