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
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#1
how to take control of player

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
04-11-2012, 10:01 AM
Find
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
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: how to take control of player

(04-11-2012, 10:14 AM)Mackiiboy Wrote:
(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.


ok cool i got it to work thanks for the info Smile
04-11-2012, 01:37 PM
Find




Users browsing this thread: 2 Guest(s)