x0_i0_position

Library file for functions that can be used to determine locations and positions.

Constants

NameValueBrief Description
DISTANCE_HUGE20.0Distance used for determining positions.
DISTANCE_LARGE10.0Distance used for determining positions.
DISTANCE_MEDIUM5.0Distance used for determining positions.
DISTANCE_SHORT3.0Distance used for determining positions.
DISTANCE_TINY1.0Distance used for determining positions.

Functions

NameBrief Description
GenerateNewLocationInternal function. Used to get the new location.
GenerateNewLocationFromLocationInternal function. Creates a new location from a given location.
GetAheadLeftLocationReturns location to the forward left and facing the target. This is useful for one of two people facing off against the target.
GetAheadLocationThis function returns a location directly in front of the tartget.
GetAheadRightLocationReturns location to the forward right and facing the target. This is useful for one of two people facing off against the target.
GetAngleBetweenLocationsReturns a float representing the angle between Location One and Location Two.
GetBehindLocationReturns location directly behind the target and facing same direction as the target.
GetCenterPointOfAreaInternal function. Get the (roughly) center point of an area.

This works by going through all the objects in an area and getting their positions, so it is resource-intensive.
GetChangedPositionConvenience function that returns a vector that is fDistance away in fAngle direction.
GetChangeInXConvenience function to calculate the change in the X axis.
GetChangeInYConvinence function to calculate the change in the Y axis.
GetCustomLeftDirectionThis function returns a normalized number that is the sum of the current facing and the angle to target.
GetCustomRightDirectionThis returns a float that is a normalized remainder of fDirection - fAngle.
GetFarLeftDirectionThis function returns a normalized number that is +135 from the current facing.
GetFarRightDirectionReturns a normalized number that is -135 from the current facing.
GetFlankingLeftLocationReturns a location on the left flank of the target.
GetFlankingRightLocationReturns a location that is the right flank (to the right and slightly behind) the Target.
GetForwardFlankingLeftLocationReturns location to the forward left flank of the target.
GetForwardFlankingRightLocationReturns location to the forward right flank of the target.
GetHalfLeftDirectionThis function returns a number that is +45 degrees from the current facing.
GetHalfRightDirectionReturns a normalized value that is -45 from fDirection.
GetLeftDirectionThis function returns a float representing a direction +90 degrees.
GetNormalizedDirectionInternal function. This function returns a float that is constrained from 0 - 360.
GetOppositeDirectionReturns a normalized direction that is -180 from fDirection.
GetOppositeLocationReturns a location that is directly behind the target.
GetRightDirectionReturns a normalized float that is -90 from the facing passed in.
GetStepLeftLocationReturns location just a step to the left.
GetStepRightLocationReturns location just a step to the right.
GetRandomLocationGet a random location in a given area based on a given object, the specified distance away.

If no object is given, will use a random object in the area.

If that is not available, will use the roughly-center point of the area.

If distance is set to 0.0, a random distance will be used.
LocationToStringTurn a location into a string.
MoveToNewLocationTells the object to move to a new location.
PrintLocationInternal function. Prints a location to the logfile.
SpeakLocationInternal function. Make the caller of the function speak a string representation of its current location.
TurnToFaceObjectTurns the target object to face another object.
VectorToStringTurn a vector into a string.


 author: Charles Feduke, editor: Mistress