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 Using MovePlayerForward Script
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
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
Find


Messages In This Thread
RE: Using MovePlayerForward Script - by Statyk - 04-06-2012, 04:43 PM



Users browsing this thread: 1 Guest(s)