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
#4
RE: Unwanted teleportation loop

Spoiler below!

(11-06-2014, 12:07 PM)FlawlessHappiness Wrote: To make a player walk forward you need to call the script-line, MovePlayerForward, once every 0,1 second.
You're only calling it once, meaning nothing really happens.

Simply create your own function that can repeat itself. Like this:

PHP Code: (Select All)
void MovePlayerForward(string &in asTimer)
{
if(
GetLocalVarInt("StopTimer") == 0)
{
MovePlayerForward(1.0);
AddTimer(""0.1"MovePlayerForward");
}


Now to stop the timer use this line: SetLocalVarInt("StopTimer", 1);
(11-05-2014, 10:44 PM)DnALANGE Wrote: Here is a timer witch called in a loop.
Moveplayertimer... 0.1 seconds it loops.

You loop the entire function called : void moveplayertimer


I want my player to move foward, but he stucks in position after he teleports.
I think it's a problem with my 'NextStartTimer' timer callback.

Or is it a bug with TeleportPlayer(); or SetPlayerPos();?
None of both made a difference, they made me stuck in position... Sad

Thanks anyways! Smile

(This post was last modified: 11-06-2014, 01:52 PM by ShadowTV.)
11-06-2014, 01:45 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)