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
"Moving" the player forward by it self - help please.
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: "Moving" the player forward by it self - help please.

Quote:
void MoveForward(string &in asTimer)
{
MovePlayerForward(1.0f);
AddTimer("automove", 0, "MoveForward");
}

void CollideAreaGrunt(string &in asParent, string &in asChild, int alstate)
{
RemoveTimer("automove");
AddTimer("", 1.25f, "LookGrunt");
}

The first part of my script demonstrates how to use the walking function, and the second part shows how to stop it; when you start the original timer, give it an internal name. Set up a new entity collide callback, and when it is triggered, remove the timer (using the internal name).

I'm not sure if I understand your second problem at all; could you be more specific?

I rate it 3 memes.
(This post was last modified: 10-12-2012, 03:06 AM by Adny.)
10-12-2012, 03:06 AM
Find


Messages In This Thread
RE: "Moving" the player forward by it self - help please. - by Adny - 10-12-2012, 03:06 AM



Users browsing this thread: 1 Guest(s)