GSC reference › Built-in
GetKnownLength()
Built-in (engine)
Client
Get the known length of the sound
Signature
GetKnownLength(<playbackId>)
Parameters
| Name | Required? | Details |
|---|---|---|
| playbackId | Required | The sound id |
Example (from Treyarch's docs)
length = GetKnownLength( level.mySnd )
Real uses in BO3's scripts
Not called anywhere in BO3's shipped scripts, so check it works in your mode before relying on it.
Related built-ins
- GetAnimLength()Gets the length of an animation
- Length()Returns the length of the given vector
- LengthSquared()Returns the squared vector length for the given vector - this is cheaper than the actual vector length as it doesn't involve a square root
- LastKnownPos()Return the last known pos of an AI.
- LastKnownTime()Return the last time an AI was aware of target.
- IsKnownEnemyInRadius()Checks if there is a known enemy in a radius for an AI.
- IsKnownEnemyInVolume()Checks if there is a known enemy in a volume for an AI.
- SetExtraCamFocalLength()Sets the extra cam fov
- GetZBarrierPieceAnimLengthForState()Returns the length in seconds for the animation associated with the supplied state for a piece, in seconds.
- GetPathLength()Gets the length of the path being used by this actor
- SetClientFocalLength()Sets cg_focalLength dvar only on this client
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).