Math Function Category

Math functions.



Functions

NameBrief Description
absGet the absolute value of a number.
acosGets the arc cosine of a value.
asinGets the arc sine of a value.
atanGets the arc tangent of a value.
cosGets the cosine of a value.
fabsGets the absolute value of a number.
FeetToMetersReturns how many meters are in fFeet.
FindSingleRangedTargetSeeks out an enemy more than 3m away
GetChangedPositionConvenience function that returns a vector that is fDistance away in fAngle direction
GetChangeInXConvenience function to calculate the change in the X axis
GetChangeInYConvenience function that calculates the change in the Y axis to the target
GetCustomLeftDirectionThis function returns a normalized number that is the sum of the current facing and the angle to target
GetDistanceBetweenThe distance in meters between two objects
GetDistanceBetweenLocationsThe distance in meters between two locations in the game.
GetDistanceToObjectThe distance from the caller of the script to the object in meters.
GetFacingFromLocationGet the facing value from a location variable.
GetFactionAverageReputationGet an integer between 0 and 100 (inclusive) that represents how an objects faction members collectively feel about the target object.
GetFactionAverageXPGet the average amount of XPs for all members in an objects faction.
GetFarLeftDirectionThis function returns a normalized number that is +135 from the current facing
GetFarRightDirectionReturns a normalized number that is -135 from the current facing
GetNormalizedDirectionThis function returns a float that is constrained from 0 - 360
GetOppositeDirectionReturns a normalized direction that is -180 from fDirection
GetRandomDelayGenerates a random number between two values used for time delays.
GetRightDirectionReturns a normalized float that is -90 from the facing passed in
IntToFloatThis function converts an int to a float of the same value.
IntToHexStringThis function converts an int to a string representation of the same hexadecimal value.
logThis function calculates the logarithmic value of fValue
powCalculates a number raised to a power.
RandomReturns a pseudo-random number with a range.
sinReturns the sine of fValue.
sqrt
tanGets the tangent of a given angle.

See Also

Function Categories