GSC reference › Built-in

DiffTrack()

Built-in (engine) Server + client Math

Returns a lagged value between <from> and <to> based on <rate> and <deltaTime>

Signature

DiffTrack(<to>, <from>, <rate>, <deltaTime>)

Parameters

NameRequired?Details
toRequired Float, start of the range
fromRequired Float, end of the range
rateRequired Floating point
deltaTimeRequired Time elapsed

Real uses in BO3's scripts

Called 3 times in the decompiled scripts. A few, zombies first:

Related built-ins

  • DiffTrackAngle()
    Returns a lagged angle between <from> and <to> based on <rate> and <deltaTime>.
  • AnimHasNotetrack()
    Queries the given animation for a note track
  • GetNotetrackTimes()
    Gets an array of the times during an animation that the given notetrack occurs.
  • GetFreerunTrackIndex()
    Returns the unique id for this mission
  • GetNotetracksInDelta()
    Get a list of notetracks and times within a specific time delta of a specific time in an animation
  • CreateTrack()
    Set the node enabled or disabled for vehicle pathfinding.
  • Int()
    Casts a floating point number or a string to an integer
  • RandomFloatRange()
    Returns a random floating point number r, where min <= r < max
  • DistanceSquared()
    Returns the squared distance between two points - this is cheaper than the actual distance as it doesn't involve a square root
  • RandomInt()
    Returns a random integer between 0 and max-1 inclusive
  • RandomIntRange()
    Returns a random integer r, where min <= r < max
  • AnglesToForward()
    Returns the forward vector corresponding to a set of angles.

New to GSC?

Start with the basics, or paste a compile error to get the fix.

Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).