I have setup a hotspot in a room and when the character talks to it a dialog is executed. Once the character asks a certain question, this sets a global variable to true and stops the dialog. When execution returns to the hotspot script, the next event is to run another script. In this script, I have the following commands:
if (<global variable> == 0) {
oPohn.Visible = true;
display("some text");
}
oPohn is an object in the room.
When I test the game the message displays first and then the object becomes visible which is the opposite of what I would expect given the order of the statements. If I take the message out then the object becomes visible right away. I'm at a loss to work out why this is happening and what I can do about it.
I did check the manual and the closest I could come to explaining it was the idea of blocking functions but to me, this still doesn't explain it as I was under the impression that a blocking function would not affect commands preceeding it.
Bascially, what I'm trying to emulate is there is a statue in a room. When the character gives a certain command to the statue it's face changes into something else and gives you some information. I am using the object as it's face. I am happy to hear alternative approaches to this scene as well as answers to the above problem.
Thank you!
if (<global variable> == 0) {
oPohn.Visible = true;
display("some text");
}
oPohn is an object in the room.
When I test the game the message displays first and then the object becomes visible which is the opposite of what I would expect given the order of the statements. If I take the message out then the object becomes visible right away. I'm at a loss to work out why this is happening and what I can do about it.
I did check the manual and the closest I could come to explaining it was the idea of blocking functions but to me, this still doesn't explain it as I was under the impression that a blocking function would not affect commands preceeding it.
Bascially, what I'm trying to emulate is there is a statue in a room. When the character gives a certain command to the statue it's face changes into something else and gives you some information. I am using the object as it's face. I am happy to hear alternative approaches to this scene as well as answers to the above problem.
Thank you!