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
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Unwanted teleportation loop

(11-06-2014, 01:45 PM)ShadowTV Wrote:
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

Well that's because you have nothing that moves him forward.

Make a time that moves him forward, and he should be doing it.

Trying is the first step to success.
11-06-2014, 02:03 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 FlawlessHappiness - 11-06-2014, 02:03 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)