Morrowind Mod:GetDistance

A UESPWiki – Sua fonte de The Elder Scrolls desde 1995


GetDistance

                GetDistance, ObjectID

       Where:   ObjectID = Object to get the distance to.

        Type:   Movement

     Returns:   float

     Example:   if ( GetDistance, denegor <= 200 )
                set fValue to ( "cienne sintieve"->GetDistance, Player )

     Scripts:   anoScript
                AzuraEnd

Returns a float value for the distance between the calling object and the given ObjectID (in game units). If one of the objects is not unique, the first instance of that object is used (thus you should only use the function with unique objects). Also, if you move one of the objects using Move or MoveWorld, GetDistance will still report the original distance (use GetPos in this situation).