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
Force player to follow enemy until it disappear help.
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#3
RE: Force player to follow enemy until it disappear help.

StartPlayerLookAt("Grunt_0", 1, 2.4f, "");

Snip from the wiki...
asEntityName - the entity to look at
afSpeedMul - how fast should the player look at the entity
afMaxSpeed - maximum speed allowed
asAtTargetCallback - function to call when player looks at target

So for "asEntityName", change this to what the enemy's name is, in the Properties on the right side under "General > Name" tab.

For "afSpeedMul", you can use numerical values, but if you want floating points (e.g. = 1.3), add a "f" to the end, like "1.3f".

"afMaxSpeed" same as above stated.

"asAtTargetCallback" If you want a function called (When the entity is in your cross-hairs) like it says. I can't remember what the parameters are needed for the function, for it to work correctly. Anyone else know?


StopPlayerLookAt();

Will just stop any StartPlayerLookAt scripts going (As long as the StartPlayerLookAt it isn't being looped.)

///////////////
If this is gonna be a monster spawn with the player being disabled. Like if you are walking a long a hallway, and you force the player to stare at a grunt walking past. Please don't do that.

If you are on the ground hurt or something, that will be fine.
07-21-2013, 05:55 PM
Find


Messages In This Thread
RE: Force player to follow enemy until it disappear help. - by Rapture - 07-21-2013, 05:55 PM



Users browsing this thread: 1 Guest(s)