Here's a chunk from a scene_init that runs a sequence then switches on a few nodes. The nodes come up fine in the debug version, but not when the code is compiled. Makes no sense to me, so I'm going to us an alternative way of doing it (window) but I thought it might be of interest.
// setup scene according to state variables
Game.SetCursor("sprites\system\RhiannonCursors\NoCursor.png");
global InventoryOn = false;
global AllowEscape = false;
Game.PlayMusicChannel(0,"scenes\00_Intro\Intro01\DistantStorm.ogg",true);
var an = Scene.GetNode("an");
an.AlphaColor = MakeRGBA(255,255,255,0);
var logo = Scene.GetNode("logo");
logo.AlphaColor = MakeRGBA(255,255,255,0);
var prod = Scene.GetNode("prod");
prod.AlphaColor = MakeRGBA(255,255,255,0);
var sell = Scene.GetNode("sell");
sell.AlphaColor = MakeRGBA(255,255,255,0);
var video = Scene.GetNode("video");
video.Active = true;
video.PlayTheora("scenes\99_Credits\CreditsMovie.ogg", false);
while(video.IsTheoraPlaying() == true)
{
Sleep(20);
}
video.Active = false;
var f;
an.Active = true;
for(f = 0; f < 256; f = f + 5)
{
an.AlphaColor = MakeRGBA(255,255,255,f);
Sleep(40);
}
logo.Active = true;
for(f = 0; f < 256; f = f + 5)
{
logo.AlphaColor = MakeRGBA(255,255,255,f);
Sleep(40);
}
prod.Active = true;
for(f = 0; f < 256; f = f + 5)
{
prod.AlphaColor = MakeRGBA(255,255,255,f);
Sleep(40);
}
Sleep(2000);
sell.Active = true;
for(f = 255; f > -1; f = f - 5)
{
an.AlphaColor = MakeRGBA(255,255,255,f);
logo.AlphaColor = MakeRGBA(255,255,255,f);
prod.AlphaColor = MakeRGBA(255,255,255,f);
sell.AlphaColor = MakeRGBA(255,255,255,255-f);
Sleep(20);
}
Sleep(2000);
// Following lines run in debug mode but NOT in compiled version
var p;
p = Scene.GetNode("b_play");
p.Active = true;
var r;
r = Scene.GetNode("b_rep");
r.Active = true;
var e;
e = Scene.GetNode("b_end");
e.Active = true;
// Execution resumes from here
Game.SetCursor("sprites\system\RhiannonCursors\Cursor_ball.png");
Game.SetMousePos(515,645);
Game.Interactive = true;