Just wondering how I can get the credits to start rolling on my script, it seems all it does is fade to black and you hear Danial breathing, but I need the credits to start rolling when its faded out. Here is my script:
void OnEnter ()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "FirstScriptArea", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "SecondScriptArea", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "ThirdScriptArea", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "LastScriptArea", true, 1);
}
void FirstScriptArea(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "DerrekMother", 0);
SetPlayerMoveSpeedMul(0.5f);
SetPlayerJumpDisabled(true);
SetPlayerCrouchDisabled(true);
PlayMusic("EndFile1.ogg", false, 20, 0, 0, true);
}
void SecondScriptArea(string &in asParent, string &in asChild, int alState)
{
StartEffectFlash(0.1f, 1.0f, 0.1f);
SetEntityActive("ScriptArea_4", true);
SetEntityActive("armour_nice_complete_4", true);
SetEntityActive("armour_nice_complete_5", true);
SetEntityActive("armour_nice_complete_6", true);
SetEntityActive("armour_nice_complete_3", false);
SetEntityActive("armour_nice_complete_1", false);
SetEntityActive("armour_nice_complete_2", false);
}
void ThirdScriptArea(string &in asParent, string &in asChild, int alState)
{
AddPropHealth("final_door", -100);
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
GiveSanityDamage(100, true);
AddPlayerBodyForce(-55000, 25000, 0, false);
FadePlayerRollTo(75, 5, 2);
StartPlayerLookAt("display_1", 10, 10, "");
SetPlayerCrouching(true);
GivePlayerDamage(10, "BloodSplat", false, false);
PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
}
void LastScriptArea(string &in asParent, string &in asChild, int alState)
{
FadePlayerRollTo(75, 5, 2);
StartPlayerLookAt("display_1", 10, 10, "");
SetPlayerCrouching(true);
PlayMusic("EndFile2.ogg", false, 20, 0, 0, true);
FadeOut(5);
}
void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
{
StartCredits("THEATTICSONG.ogg" , true , "Endcredits" , "Credittext" , 1);
}
void OnLeave ()
{
}