how to make gui disapear (not guioff)

Started by dikla, Sat 24/07/2004 17:09:23

Previous topic - Next topic

dikla

I have in the room 4 hotspot which directs to several rooms. one of the hotspot is the speed slider. after you click it, and after you click on the other hotspot - the slider keep showing in every room.
the GUIOff command make the slider not shown at all.
i tried to put guioff in the other hotspots but it does not help.
here is the script:
function interface_click(int interface, int button) {
Ã,  if (interface == 4) {Ã,  // gui the slider is on

Ã,  Ã, if (button == 0) SetGameSpeed(GetSliderValue(4,0));Ã, 
//all this in the gloabl scipt

in the hotspot
ShowGUI (4);

RUNSCRIPT

SetGUIPosition (4,33, 146);Ã, 

if (IsGamePaused() == 1) UnPauseGame();

now what should i do to make the gui(4) not appearing in every room.
tx diklaÃ, 


Radiant

check the on_event function, and in LEAVE_ROOM turn the GUI off.

dikla

first, the function on-event does not appear in my gloabl script, but i added it:
function on_event (LEAVE_ROOM, 13){
  GUIOff (4);
}
but when i try to save it says:
PEO(3): parse error at 1.
can you tell me whats worng?
dikla

monkey0506

it should go like this:

function on_event(int event, int data){
  if (event==LEAVE_ROOM) GUIOff(4);
  }

DO NOT CHANGE THIS SCRIPT. I made is specifically for you. Just copy it, and paste it in place of your on_event script.  ;D I'm in such a great mood!

monkey0506

Correction:

function on_event(int event, int data){
  if (event==LEAVE_ROOM){
    if (data==13) GUIOff(4);
    }
  }

I really should just log in. But this script will turn the GUI off when you leave room 13. Which is what it appears you are trying to do.

SMF spam blocked by CleanTalk