GetDistance2D
From GECK
A function added by the Lutana NVSE plugin, now part of the JIP NVSE Plugin.
Contents
Description
Faster version of GetDistance. Ignores the z-axis. Can also be used as a condition.
Unlike GetDistance, this does not cause crashes if the reference(s) are not in the current cell/worldspace.
Syntax
(float) [Actor, Activator].GetDistance2D ref:ref
Example
Player.GetDistance2D Molerat01Ref
Returns the distance between the player and the Molerat
Notes
- If the reference(s) are not in the current cell/worldspace, or the references are invalid, returns FLT_MAX (3.402823466e+38F).
- Return value is measured in game Units.