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
#1
How to use "Automatic walking script!

Hey all, just wanna ask, I'm making with my friend new Amnesia mod and I'm planning to do Intro, but we don't know how to make player walk "automatically on certain point" how you do this?  Huh

Please, help us. Smile

“Life is a game, play it”
(This post was last modified: 02-27-2019, 05:49 PM by HumiliatioN.)
02-27-2019, 02:56 PM
Find
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
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




Users browsing this thread: 1 Guest(s)