Hi, I'm not able to turn on an object in the room during a dialog.
I tried this:
-in dialog I used
run-script 80
-under function dialog_request i inserted
if (param == 80) {
variablex=1;}
-in repeatedly execute
if (variablex == 1) { oObject1.visible = true; }
But it doesn't work.
I need this object visible=true in the middle of a dialog... please help me :) thank you.
If you're using the newest version of AGS, you can simply use
oObject1.Visible = true;
in the dialogue script. Copy and paste it exactly like that, the space sign is rather important.
(In case you're curious... "Indented lines signify that AGS should interpret the line as a normal scripting command rather than a dialog scripting command.", quoth the manual.)
Quote from: Akatosh on Fri 02/10/2009 12:20:27
If you're using the newest version of AGS, you can simply use
oObject1.Visible = true;
in the dialogue script. Copy and paste it exactly like that, the space sign is rather important.
(In case you're curious... "Indented lines signify that AGS should interpret the line as a normal scripting command rather than a dialog scripting command.", quoth the manual.)
I used this method before, but it said Error (line 9): Undefined token 'oObject1'
It's indented, but it still doesn't work in the last beta version.
Hmm. Did you really assign that script name to the object? Or did you mean object[0] instead?
You need to use the name of your object, or object[Objectnumber] to do this...
Edit: Too slow! :P
object[1] it works :D
Thank you
The coding ninja strikes again! Ha-HAA!
Anyhow, you're welcome. ;)
In a global environment, room objects and hotspots can only be accessed by their global array, not by their scriptname.