Do this if a GUI has been visible..

Started by barefoot, Mon 07/02/2011 13:09:09

Previous topic - Next topic

barefoot

Hi

Im trying to script a piece so that if a GUI has been opened (visible) and closed (invisible) the next thing happens..I can do this ok through a button on a GUI except it would be different for each room so not much good.

Summery:

There are 6 GUI's in total. Each one is a page of a diary and has links to the next page and back. On the last page you have a close link which closes the GUI and returns to gameplay.

My character is in bed and does not move but can talk. So when the diary is closed i need to check it is and for a display to show and the character to changrooms.

At the moment my char has a room_Timed RepExec for the char to talk which stops when the diary GUI is opened from a button.

Something like if a gui has been visible do this etc  something along that line.

What about if player has been in previous/certain  room?

Hope i've put this clearly enough

cheers

barefoot


I May Not Be Perfect but I Have A Big Heart ..

Akatosh

Quote from: barefoot on Mon 07/02/2011 13:09:09
Something like if a gui has been visible do this etc  something along that line.

You'll need to use a boolean for this. Declare the variable as false, set it true in the same function that the GUI is set visible. When you need to know whether the GUI has been visible, just examine the value.

Quote from: barefoot on Mon 07/02/2011 13:09:09
What about if player has been in previous/certain  room?

One of these functions, depending on what exactly you're trying to check.

SMF spam blocked by CleanTalk