The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help PlayerStartAreas are behaving weirdly/teleport script not working
ethics Offline
Member

Posts: 51
Threads: 18
Joined: Jan 2014
Reputation: 0
#1
PlayerStartAreas are behaving weirdly/teleport script not working

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?

(This post was last modified: 04-08-2017, 10:05 PM by ethics.)
04-08-2017, 09:43 PM
Find


Messages In This Thread
PlayerStartAreas are behaving weirdly/teleport script not working - by ethics - 04-08-2017, 09:43 PM



Users browsing this thread: 3 Guest(s)