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
Unwanted teleportation loop
ShadowTV Offline
Junior Member

Posts: 11
Threads: 3
Joined: Sep 2013
Reputation: 0
#1
Sad  Unwanted teleportation loop

Hey guys,

I once again need help with my custom story.
This time I made a teleportation to a position in my intro map.

The problem here is:
1. It keeps teleporting me to the same position without a loop.
2. My view snaps back to the direction of the "PlayerStartArea_3".
3. I can't move forwards/backwards/left/right (just a few cm).

Here is the .hps file of my map:
Spoiler below!

void OnStart()
{
//LOCAL VARIABLES

//ADDENTITYCOLLIDECALLBACK
AddEntityCollideCallback("Player", "StartIntro", "IntroStart", true, 1);

//ADDTIMER


//FUNCTIONS
FadeOut(0.0);
}
//START INTRO//
void IntroStart(string &in asParent, string &in asChild, int alState)
{
FadeIn(1.5f);
AddTimer("MovePlayer", 0.1, "MovePlayerTimer");
}

void MovePlayerTimer(string &in asTimer)
{
MovePlayerForward(5.0);
AddTimer("MovePlayer", 0.1, "MovePlayerTimer");
AddTimer("ShowFirstMessage", 3.0, "ShowFirstMessageTimer");
}
//END INTRO//

//START FIRST MESSAGE//
void ShowFirstMessageTimer(string &in asTimer)
{
//SetMessage("TextDisplay", "FirstMessage", 5.0);
AddTimer("NextStart", 3.0, "NextStartTimer");
}
//END FIRST MESSAGE//

//START NEXT START TIMER//
void NextStartTimer(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_3");
AddTimer("DisablePSA3", 0.1, "DisablePSA3");
}

void DisablePSA3(string &in asTimer)
{
SetEntityActive("PlayerStartArea_3", false);
}

//START SECOND MESSAGE//
void ShowSecondMessageTimer(string &in asTimer)
{
//SetMessage("TextDisplay", "SecondMessage", 5.0);
//AddTimer("NextStart_1", 2.0, "NextStartTimer_1");
}
//END SECOND MESSAGE//

/*//START NEXT START_1//
void NextStartTimer_1(string &in asTimer)
{

}*/

void OnEnter()
{

}


void OnLeave()
{

}


I can't find a loop with "AddTimer" or any other loop. Sad

Thanks for any answer!

11-05-2014, 09:50 PM
Find


Messages In This Thread
Unwanted teleportation loop - by ShadowTV - 11-05-2014, 09:50 PM
RE: Unwanted teleportation loop - by DnALANGE - 11-05-2014, 10:44 PM
RE: Unwanted teleportation loop - by ShadowTV - 11-06-2014, 01:45 PM
RE: Unwanted teleportation loop - by ShadowTV - 11-06-2014, 02:29 PM
RE: Unwanted teleportation loop - by ShadowTV - 11-06-2014, 02:57 PM



Users browsing this thread: 1 Guest(s)