01-12-2011, 11:20 AM
Hey. I have a problem with this script. Since I'm really new to C++ as a whole, I cannot actually see what I am doing wrong. But here is the script. An explanation of what I am doing wrong and why, would be appreciated.
Seragath.
It does trigger the first FadeOut(0) etc. But not the rest of it. (And this "string &in asSomething") is still quite confusing for me.
Seragath.
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "Faint","Faint_scare", true, 1);
}
////Room_With_Key_Scare//////////
/////////////////////////////////
void Faint_scare(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(1000, true);
AddTimer("Doom", 2, "TeleportPlayer");
FadeOut(0)
}
void TeleportPlayer(string &in asParent, string &in asChild, string &in asTimer, int alState)
{
TeleportPlayer("PlayerStartArea_2");
FadeIn(20);
AddTimer("Doom_end", 2, "Teleportback");
}
void Teleportback(string &in asParent, string &in asChild, string &in asTimer, int alState)
{
TeleportPlayer("PlayerStartArea_3");
}
////Room_With_Key_Scare_Ends///////
///////////////////////////////////
It does trigger the first FadeOut(0) etc. But not the rest of it. (And this "string &in asSomething") is still quite confusing for me.