Frictional Games Forum (read-only)
How to use "Automatic walking script! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How to use "Automatic walking script! (/thread-56280.html)



How to use "Automatic walking script! - HumiliatioN - 02-27-2019

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


RE: How to use "Automatic walking script! - Mudbill - 02-28-2019

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:
void OnStart()
{
    
// ...
    
TimerWalkForward("");
}

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


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


RE: How to use "Automatic walking script! - HumiliatioN - 02-28-2019

(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:
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