global_cinematicFX.scr

Dependencies

#include "maps/global_scripts/global_common.scr"
#include "maps/global_scripts/global_math.scr"

Purpose

Commands used mainly for cinematic stuff

How To Use

These are a set of functions that effect camera FOVs, and camera path and object positioning.

External Functions

globalCineFX_CameraFOVLerp( entCamera, fltFOVStart, fltFOVEnd, fltTime, strCurve )

Purpose:
Smoothly changes a camera's FOV with acceleration for a Zoom effect.

    Parms:
  • entCamera (entity)
    The camera to zoom.

  • fltFOVStart (float)
    Starting FOV for the zoom.
  • fltFOVEnd (float)
    The ending FOV for the zoom.
  • fltTime (float)
    The time to take for the zoom.
  • strCurve (string)
    The acceleration curve to use, there are 3 options:

    • rampup
      This will make the object start from still and ramp up to it's maximum velocity.
    • rampdown
      This will make the object start at maximum velocity and slow down to still.
    • rampupdown
      This will make the object start from still, ramp up to it's maximum velocity, the slow down to still again.

globalCineFX_CameraPathRemove( entCamPath )

Purpose:
Removes an entire camera path. This was created so camera paths created with the in-game path creator could be removed.

    Parms:
  • entCamPath (entity)
    The lead node in the path. If the camera path was created with the in-game path creator, this is the name of the path

globalCineFX_CameraPathRotate( entCamPath, fltDegrees, vecPivotCoordinate, vecDestinationCoordinate )

Purpose:
Takes a path and rotates the entire path around a desired pivot point. This will also rotate the facing on all of the nodes in the path accordingly.

    Parms:
  • entCamPath (entity)
    The lead node in the path. If the camera path was created with the in-game path creator, this is the name of the path.

  • fltDegrees (float)
    How far to rotate the path around in degrees. Positive is counterclockwise and negative is clockwise.

  • vecPivotCoordinate (vector)
    The origin of the point to pivot the path around.

  • vecDestinationCoordinate (vector)
    The origin of the final position for the entire path based off of the pivot point. What this means is that it will rotate the entire path around the pivot point, and then re-position the entire path by moving the pivot point with the new rotational orientation locked to the pivot point as it moves.
    So if you want to just rotate the path without re- positioning it, just enter the pivot point coordinate as the destination coordinate

globalCineFX_TimeLerp( fltTimeScaleStart, fltTimeScaleEnd, fltTime, strCurve )

Purpose:
The goal of this function was to create cool slow motion transitions as it would ramp time up or down. But the timescale command didn't work very well with this technique, so hence this function doesn't really work all too well. Try at yer own risk suchah's :).

    Parms:
  • fltTimeScaleStart (float)
    The starting timescale value based on a normalized scale. Meaning 1 is in normal time, .5 would be half-time, and 2 would be double time

  • fltTimeScaleEnd (float)
    The ending timescale value based on a normalized scale. Since I know you just read the previous description, I'm not going to repeat the whole, 'what does normalized' mean schpeal. :)

  • fltTime (float)
    The time for the whole lerp to take. This starts getting tricky because this wouldn't be the actual time. As you start to timescale the game, the actual time of the game will be effected, thus effecting the timers in the engine that count time. There were no time commands written 'outside' of normal time to account for this and the timescale command. Wow, there's a lot of time in this description, I think it's time to move on.

globalCineFX_PositionObject( entObject, entDestination )

Purpose:
Takes an object and moves it to be at the same position and orientation of another object.

Parms:

  • entObject (entity),
    The object to re-position and re-orient

  • entDestination (entity)
    The destination entity. This function will take the entObject and set it's origin and angles to this entities origin and angles