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
How to use "Automatic walking script!
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#3
RE: How to use "Automatic walking script!

(02-28-2019, 12:50 PM)Mudbill Wrote: The only built-in script for doing this is MovePlayerForward. As the name says, you can only move them forward, not sideways. If you want to run this script you need to put it inside a looping timer.

PHP Code: (Select All)
void OnStart()
{
 
   // ...
 
   TimerWalkForward("");
}

void TimerWalkForward(string &in asTimer)
{
 
   MovePlayerForward(10.0f);
 
   AddTimer("loop"0.1f"TimerWalkForward");


To stop the walking, use RemoveTimer("loop");

Thank you so much, it works now. Smile

“Life is a game, play it”
02-28-2019, 07:39 PM
Find


Messages In This Thread
RE: How to use "Automatic walking script! - by HumiliatioN - 02-28-2019, 07:39 PM



Users browsing this thread: 1 Guest(s)