(05-02-2011, 03:07 PM)Roenlond Wrote: Just change the place that StopMusic is in, place it under the area collide function.
It already is this is the script
void OnStart()
{
AddTimer("", 100.0, "SpawnMrFace");
SetEntityPlayerInteractCallback("castle_1", "Barricaded", true);
AddQuest("FirstQuest", "QuestOne");
SetDeathHint("DeathHints", "DeathHint01");
wakeUp();
AddTimer("", 4.0, "SwapSound");
AddTimer("", 5.0, "WakeUpStart");
AddEntityCollideCallback("Player", "ScriptArea_1", "ClosingIn", true, 1);
}
void wakeUp ()
{
PlayGuiSound("explosion_rock_large.snt", 100.0);
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
SetPlayerActive(false);
SetMessage("Messages", "OpeningText", 7.0);
}
void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
AddTimer("", 100.0, "SpawnMrFace");
}
void SwapSound(string &in asTimer)
{
PlayGuiSound("player_bodyfall.snt", 100.0);
AddTimer("", 5.0, "WakeUpStart");
}
void WakeUpStart(string &in asTimer)
{
StopMusic(3.5, 1);
PlayMusic("Resident Evil 3 - Nightmare Theme_Resident Evil 3 OST - The Beginning of Nightmare.ogg", true, 100.0, 0.0, 10, true);
SetEntityActive("Servant_grunt_1", true);
SetEntityActive("servant_grunt_2", true);
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
void Barricaded(string &in entity)
{
SetMessage("LockedDoors", "BarricadedDoor", 5.0);
}
void SpawnMrFace(string &in asTimer)
{
SetEntityActive("Servant_Grunt_3", true);
AddEnemyPatrolNode("Servant_grunt_3", "FirstNode", 10.0, "Walk");
}
void ClosingIn(string &in asParent, string &in asChild, int alState)
{
StopMusic(3.5, 10);
SetDeathHint("DeathHints", "DeathHint02");
SetEntityActive("Servant_grunt_4", true);
SetEntityActive("Servant_grunt_5", true);
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}