Frictional Games Forum (read-only)

Full Version: Look @ somthing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I'm trying to make the player's head rotate

void FadePlayerRollTo(80, float 2, float 2);

but I don't know how to use it, could you help?

Thx Big GrinCoolBig Grin
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();


//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");

From the sticky up top.