04-08-2017, 09:43 PM
I've got a very strange problem.
I made a script that triggers when you touch a door; you will be teleported "behind" the door. I reality, you are teleported to a different area of the map in front of a door (some may recall this mechanic from Cry of Fear).
Here's the problem: The TeleportPlayer script does not work at all. I interacted with the door and nothing happened.
Also, now that I have placed a second PlayerStartArea, it starts me at that one when loading the level from the menu, although I have defined a different one in the custom_story_settings. wtf?
Here's my script:
void OnStart()
{
SetEntityPlayerInteractCallback("tur_raus", "Stuff", true);
}
void Stuff(string &in asEntity)
{
FadeOut(5);
AddTimer("tele", 5, "Teleport");
}
void Teleport(string &in asTimer)
{
FadeIn(5);
TeleportPlayer("draussenstart");
}
EDIT:
I kinda solved this by changing the level when you touch the door, but this still interests me. Was there an update that made the TeleportPlayer script unusable?
I made a script that triggers when you touch a door; you will be teleported "behind" the door. I reality, you are teleported to a different area of the map in front of a door (some may recall this mechanic from Cry of Fear).
Here's the problem: The TeleportPlayer script does not work at all. I interacted with the door and nothing happened.
Also, now that I have placed a second PlayerStartArea, it starts me at that one when loading the level from the menu, although I have defined a different one in the custom_story_settings. wtf?
Here's my script:
void OnStart()
{
SetEntityPlayerInteractCallback("tur_raus", "Stuff", true);
}
void Stuff(string &in asEntity)
{
FadeOut(5);
AddTimer("tele", 5, "Teleport");
}
void Teleport(string &in asTimer)
{
FadeIn(5);
TeleportPlayer("draussenstart");
}
EDIT:
I kinda solved this by changing the level when you touch the door, but this still interests me. Was there an update that made the TeleportPlayer script unusable?