05-24-2011, 08:31 PM
hey guys, since my previous works on a custom story got corrupted in a Crash, I decided to make a new Story. Now scarier as Ever!
BUT. I came onto a problem with teleporting.
here is my code:
Nothing happens when i enter the Area I've made. It's pretty annoying.
BUT. I came onto a problem with teleporting.
here is my code:
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "TeleportDream1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "TeleportOutOfDream1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "TriggerEnemy0", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "TriggerEnemy1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "TriggerEnemy2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "TriggerEnemy3", true, 1);
}
void TeleportDream1(string &in asParent, string &in asChild, string &in asTimer, int alState)
{
AddTimer("LetsTeleport", 2, "TeleportPlayer");
TeleportPlayer("PlayerStartArea_2");
GiveSanityDamage(65, true);
SetEntityActive("ScriptArea_1", false);
FadeOut(0);
}
void TeleportPlayer(string &in asParent, string &in asChild, string &in asTimer, int alState)
{
FadeIn(5);
TeleportPlayer("PlayerStartArea_2");
}