Mod:Creation Kit/GetTransmitterDistance - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Returns the distance between this radio transmitter and the player (Pipboy radio).

Syntax
float Function GetTransmitterDistance native

Parameters
None.

Return Value

 * The distance between this radio transmitter and the player.
 * FLT_MAX (an extremely large value) if the ref is not a transmitter, is disabled, is not currently filling a Quest Alias, is out-of-range, or is using a frequency not detectable by the Pipboy radio.
 * 0.0 if the ref is an active, unlimited-range transmitter.

Examples
Debug.Trace("Player is " + MyTransmitterRef.GetTransmitterDistance + " units away from MyTransmitterRef.")
 * Find out how far away the player is from the transmitter ref.