Stupid question regarding room scripts (Solved)

Started by rozojc, Wed 13/07/2005 20:47:33

Previous topic - Next topic

rozojc

I have a (stupid) question concerning the room script. I'm making a room in which I want the status bar (GUI number 0) to be "invisible", so I thought it would be as easy as adding a line that said "GUIOff(0);" into the room script (by clikcing on the "{}" icon, right?), but as soon as I try to save the room I get a parse error saying there's an unexpected InterfaceOff...

Obviously I'm doing it wrong, but I have no clue how to do it then...

A suspense adventure game where you play an anti-hero, check it out!

strazer

The room script contains script for every event in this room. If you don't put the command in a function, how should AGS know when to execute it?

You first have to create the event function with the interaction editor.
Press the  "i" button, select when your command should be executed ("Player enters screen (before fadein)" for example), add a "Run script" action and press the "Edit script..." button. A window opens where you can put your command. Close and save.

Now press the "{}" button again and you will see that your command is encapsulated by the event function.
The "{}" button exists so you can quickly see and edit every script in this room and don't have to use the interaction editor every time to access the scripts.

monkey0506

Try (interaction editor):

Player enters screen before fade-in -> Run Script:

GUIOff(0);

And I'm guessing you're using 2.62?  Else you would use

gGuiname.Visible = false;

as the script.

Edit:  Darn strazer and his posting before myself-ness.

rozojc

Quote from: monkey_05_06 on Wed 13/07/2005 21:00:25
Try (interaction editor):

Player enters screen before fade-in -> Run Script:

GUIOff(0);

And I'm guessing you're using 2.62?  Else you would use

gGuiname.Visible = false;

as the script.

Edit:  Darn strazer and his posting before myself-ness.
How stupid can I be!!! Thanks, for the quick help!

A suspense adventure game where you play an anti-hero, check it out!

SMF spam blocked by CleanTalk