Frictional Games Forum (read-only)
Look @ somthing - Printable Version

+- Frictional Games Forum (read-only) (
+-- Forum: Amnesia: The Dark Descent (
+--- Forum: Custom Stories, TCs & Mods (
+--- Thread: Look @ somthing (/thread-7760.html)

Look @ somthing - X4anco - 05-02-2011


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

RE: Look @ somthing - Roenlond - 05-02-2011

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.