GUIon?

Started by beaver, Fri 30/04/2004 06:34:40

Previous topic - Next topic

beaver

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.

Scummbuddy

set that guis settings to "Popup modal". i think thats what you're missing.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Ashen

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.
I know what you're thinking ... Don't think that.

Ishmael

You wrote GUIon? It is GUIOn... AGS is case-sensitive.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

beaver

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?


Ishmael

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.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

beaver

ehhe, thanks. i forgot counting started at 0 and not 1 =)

SMF spam blocked by CleanTalk