46
Technical forum / Re: What are 'Rotation Levels'?
« on: January 13, 2010, 02:51:01 PM »
Thanks Mnemonic for the 'what'. Can you point me to 'why' and 'how' documentation anywhere?
Forum rules - please read before posting, it can save you a lot of time.
// 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;
// Map thing
var CauldronMap = new Object("entities\CauldronCombine\CauldronMap.script");
CauldronCombine.S = false;
global Noel;
Game.Msg("On opening window, Noel.Map is: "+Noel.Map);
CauldronMap.DisableMap();
CauldronCombine.S = true;
//
method DisableMap()
{
// TEST CODE
if(CauldronCombine.Disable == null)
{
CauldronCombine.Disable = 1;
}
else
{
CauldronCombine.Disable = CauldronCombine.Disable + 1;
}
Game.Msg("Disable count: "+CauldronCombine.Disable);
//
var a = CauldronCombine.P;
var b = CauldronCombine.S;
var c = CauldronCombine.W;
var d = CauldronCombine.PS;
var e = CauldronCombine.SW;
if(a != true && b != true && c != true && d != true && e != true)
{
Game.Msg("At First, Noel.Map: "+Noel.Map);
CauldronCombine.First = true;
CauldronCombine.FirstMap = Noel.Map;
CauldronCombine.MapState = CauldronCombine.FirstMap;
}
else
{
CauldronCombine.First = false;
CauldronCombine.MapState = CauldronCombine.FirstMap;
}
Noel.Map = false;
}