Hi all.
Hard to articulate this question -
I want to make a trigger in room_RepExec() that activates something else.
Like:
room_RepExec()
{
if (object[1].Visible == false){
// then [1]
}
}
where
[1] is:
gGui12.Visible = true;
cChar3.move(222,333);
and other stuff.
Is there a name for this kind of set up?
How is it phrased and where would the [1] be defined for the computer and where should it go in the code?
(I've found it can't go in the room_RepExec() because sounds stutter, gGuis flicker and mouse pointers disappear.)
That's because you're doing this repeatedly. You only need to do this once.
You can use a variable to track whether the action has been carried out, for example, put on top of the script:
bool eventdone = false;
Then in the repeatedly executed codes:
room_RepExec(){
if (object[1].Visible == false&&eventdone==false){
gGui12.Visible = true;
cChar3.move(222,333);
//and other stuff.
eventdone = true;
}
}
Thankyou, I'll try that.
Also, if it's only going to happen once, you can use Game.DoOnceOnly (http://www.adventuregamestudio.co.uk/manual/Game.DoOnceOnly.htm).
room_RepExec(){
if (!object[1].Visible && Game.DoOnceOnly("room x, object 1 disappeared")) {
gGui12.Visible = true;
cChar3.move(222,333);
}
}