Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: Using MovePlayerForward Script
It is not looping the timer. do something like:
void placeacid(string &in asItem, string &in asEntity)
{
RemoveItem("acidjar_1");
SetEntityActive("explosivejar", true);
SetPlayerActive( false);
StartPlayerLookAt("walkto", 10.0f, 10.0f, "");
AddEntityCollideCallback("Player", "walkto", "lookexplosion", true, 1);
AddTimer("walktotimer", 0.3f, "atwalkto");
}
void atwalkto(string &in asTimer)
{
MovePlayerForward(10.0f);
AddTimer("looper", 0.1f, "restart_walk");
}
void restart_walk(string &in asTimer)
{
AddTimer("restarter", 0, "atwalkto");
}
//________________
Then when you want him to stop, either on a timer or in a script area collide, place these:
RemoveTimer("looper");
RemoveTimer("restarter");
(This post was last modified: 04-06-2012, 04:43 PM by Statyk.)
|
|
04-06-2012, 04:43 PM |
|