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).
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:
(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:
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...
(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:
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...
Thanks anyways!
Well that's because you have nothing that moves him forward.
Make a time that moves him forward, and he should be doing it.
(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:
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...
Thanks anyways!
Well that's because you have nothing that moves him forward.
Make a time that moves him forward, and he should be doing it.
He tries to move foward, but he gets teleported back to the PlayerStartArea.