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
how to take control of player
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#2
RE: how to take control of player

(04-11-2012, 10:01 AM)zombiehacker595 Wrote: this is the first time of trying this now i know that it included like setplayer look at or something but what would i add to the script to get a player to look at an area for 1 or 2 seconds
.
You could add a timer, after 0 seconds, the player starts to look at a specific entity/area with:

void StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);

--------------------
Forces the player to look at a certain entity until StopPlayerLookAt is used.
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

--------------------

And after 2 seconds in your timer, the player stops to look at the entity/area with:

void StopPlayerLookAt();

--
It requires that you know how to set up a timer.

(This post was last modified: 04-11-2012, 10:22 AM by Mackiiboy.)
04-11-2012, 10:14 AM
Website Find


Messages In This Thread
RE: how to take control of player - by Mackiiboy - 04-11-2012, 10:14 AM



Users browsing this thread: 1 Guest(s)