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 look somewhere
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#4
RE: Force player to look somewhere

(10-12-2012, 01:57 PM)Nemet Robert Wrote: I'm not sure what you're trying to say.

1) You don't know HOW to make the player look at something?
2) It just doesn't work.

If 2 is the answer, post your script file.
http://www.frictionalgames.com/forum/thread-5117.html


Force player to look somewhere by mastersmith98
Spoiler below!

StartPlayerLookAt(ScriptArea, viewacceleration, maxviewvelocity, onlook);
ScriptArea is the name of the area script you place in your map and where the player looks.
viewacceleration controls how fast the player looks.
maxviewvelocity controls the max speed the player looks.
onlook is a function you call when the player's view is centered on the target.
To stop the player from looking at a spot, call StopPlayerLookAt();
Example:
void TimerDoneLookAt(string &in asTimer)
{
StopPlayerLookAt();
}

//When player starts the level, make him look at this spot.
void OnStart()
{
// Function argument is empty since we don't want to call a function.
StartPlayerLookAt("AreaLookAt", 2, 2, "");

//Make the player look for 2.5 seconds
AddTimer("donelook", 2.5f, "TimerDoneLookAt");
}

(This post was last modified: 10-12-2012, 02:35 PM by naseem142.)
10-12-2012, 02:35 PM
Website Find


Messages In This Thread
Force player to look somewhere - by naseem142 - 10-12-2012, 01:26 PM
RE: Force player to look somewhere - by Robby - 10-12-2012, 01:57 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 02:35 PM
RE: Force player to look somewhere - by Lizard - 10-12-2012, 02:34 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 02:53 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 03:07 PM
RE: Force player to look somewhere - by naseem142 - 10-12-2012, 04:28 PM



Users browsing this thread: 6 Guest(s)