Hi everybody,
I'm new to the forum and the Wintermute Engine, I've read many topics searching for a solution for my problem but I couldn't find any...
So, I have a script on an entity that plays a certain music and trigger a "cut-scene" the first time you click on the hotspot, the FIRST time you visit the scene.
well, that should be the right behavior, instead every time I exit the scene and re-enter it, the script become active again.
Here, I'm telling you what I tried to do to solve the problem:
1) modify the entity script this way: (just after the on "LeftClick" event line, before the other instructions )
global StateOutside;
if (StateOutside.Visited == true){
gargoyle.DetachScript("\scenes\Outside\scr\gargoyleworm.script",true);
}
the detached script is the same that is running...
more over, as a test I also made this thing in the scene_init.script:
if(!StateOutside.Visited)
{
StateOutside.Visited = true;
Game.Msg("state is true now");
}
but it didn't print anything on screen...
where am I making mistakes?
thank you!