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!
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: How to use "Automatic walking script!

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");

(This post was last modified: 02-28-2019, 12:51 PM by Mudbill.)
02-28-2019, 12:50 PM
Find


Messages In This Thread
RE: How to use "Automatic walking script! - by Mudbill - 02-28-2019, 12:50 PM



Users browsing this thread: 1 Guest(s)