9
« on: February 03, 2005, 02:03:50 AM »
Somehow My music crossfader is not working.
The music plays fine but it's not crossfading when I go to the next scene.
Scene one:
#include "scripts\base.inc"
// here comes the stuff which initializes the scene
// setup actor's initial position depending on where he came from
actor.Active = true;
if(Game.PrevScene=="bieb")
{
actor.SkipTo(966, 433);
actor.Direction = DI_DOWN;
Scene.SkipTo(actor.X, actor.Y);
Game.PlayMusicChannel(1, "muziek\markt.wav", true);
Game.MusicCrossfade(0, 1, 10000);
}
else
{
if(Game.PrevScene=="bos2")
{
actor.SkipTo(1375, 960);
actor.Direction = DI_LEFT;
Scene.SkipTo(actor.X, actor.Y);
Game.PlayMusicChannel(1, "muziek\markt.wav", true);
Game.MusicCrossfade(0, 1, 10000);
}
else
{
if(Game.PrevScene=="kerk")
{
actor.SkipTo(430, 282);
actor.Direction = DI_DOWN;
Scene.SkipTo(actor.X, actor.Y);
Game.PlayMusicChannel(1, "muziek\markt.wav", true);
Game.MusicCrossfade(0, 1, 10000);
}
else
{
Game.Interactive = false;
Game.PlayMusicChannel(1, "muziek\markt.wav", true);
Game.MusicCrossfade(0, 1, 10000);
actor.SkipTo(914, 833);
actor.Direction = DI_DOWNLEFT;
Sleep (2000);
actor.Talk("Bla bla");
Game.Interactive = true;
}
}
}
////////////////////////////////////////////////////////////////////////////////
// scene state
global Stateplein;
// default values
if(Stateplein==null)
{
Stateplein.Visited = false;
// add scene states here
}
////////////////////////////////////////////////////////////////////////////////
// setup scene according to state variables
////////////////////////////////////////////////////////////////////////////////
if(!Stateplein.Visited)
{
Stateplein.Visited = true;
// this is our first visit in this scene...
}
bieb scene:
#include "scripts\base.inc"
// here comes the stuff which initializes the scene
actor.SkipTo(1123, 562);
actor.Direction = DI_DOWNLEFT;
Scene.SkipTo(actor.X, actor.Y);
actor.Active = true;
Game.PlayMusicChannel(1, "muziek\bibliotheek.wav", true);
Game.MusicCrossfade(0, 1, 10000);
////////////////////////////////////////////////////////////////////////////////
// scene state
global Statebieb;
// default values
if(Statebieb==null)
{
Statebieb.Visited = false;
// add scene states here
}
////////////////////////////////////////////////////////////////////////////////
// setup scene according to state variables
////////////////////////////////////////////////////////////////////////////////
if(!Statebieb.Visited)
{
Statebieb.Visited = true;
// this is our first visit in this scene...
}
So when I go to the "bieb" scene It should crossfade the markt.wav into the bibliotheek.wav right?
And the 10 second fade is just for the test so I am sure I will notice the differents.
Thanx in advance,
Brain.