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
Script Help Forcing the player to walk
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: Forcing the player to walk

Going with the previous script, make the timers have 0.01f instead of 1... It needs to update 60 times a second. Setting it to 1 will have it update only once a second, which is not enough. Also, it needs another time to call back on the previous timer. So you should have 3 "AddTimer"s instead of only two. Like this:

void Onstart()
{
AddTimer("", 0, "TimerName");
}

void TimerName(string &in asTimer)
{
MovePlayerForward(1);
AddTimer("", 0.01f, "TimerName2"); //timer calls the timer that re-runs it instantly.
}


void TimerName2(string &in asTimer)
{
AddTimer("", 0, "TimerName"); //timer reverts back to the previous function and loops
}
(This post was last modified: 01-08-2012, 06:23 PM by Statyk.)
01-08-2012, 06:17 PM
Find


Messages In This Thread
Forcing the player to walk - by Measuring - 01-08-2012, 10:02 AM
RE: Forcing the player to walk - by Dobbydoo - 01-08-2012, 10:13 AM
RE: Forcing the player to walk - by Statyk - 01-08-2012, 06:17 PM
RE: Forcing the player to walk - by Dobbydoo - 01-08-2012, 08:44 PM
RE: Forcing the player to walk - by Statyk - 01-08-2012, 10:19 PM
RE: Forcing the player to walk - by 4WalledKid - 10-16-2012, 04:02 PM
RE: Forcing the player to walk - by Apjjm - 10-16-2012, 04:44 PM



Users browsing this thread: 3 Guest(s)