x0_i0_position
Library file for functions that can be used to determine locations and positions.Constants
| Name | Value | Brief Description | DISTANCE_HUGE | 20.0 | Distance used for determining positions. | DISTANCE_LARGE | 10.0 | Distance used for determining positions. | DISTANCE_MEDIUM | 5.0 | Distance used for determining positions. | DISTANCE_SHORT | 3.0 | Distance used for determining positions. | DISTANCE_TINY | 1.0 | Distance used for determining positions. |
|---|
Functions
| Name | Brief Description |
|---|---|
| GenerateNewLocation | Internal function. Used to get the new location. |
| GenerateNewLocationFromLocation | Internal function. Creates a new location from a given location. |
| GetAheadLeftLocation | Returns location to the forward left and facing the target. This is useful for one of two people facing off against the target. |
| GetAheadLocation | This function returns a location directly in front of the tartget. |
| GetAheadRightLocation | Returns location to the forward right and facing the target. This is useful for one of two people facing off against the target. |
| GetAngleBetweenLocations | Returns a float representing the angle between Location One and Location Two. |
| GetBehindLocation | Returns location directly behind the target and facing same direction as the target. |
| GetCenterPointOfArea | Internal 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. |
| GetChangedPosition | Convenience function that returns a vector that is fDistance away in fAngle direction. |
| GetChangeInX | Convenience function to calculate the change in the X axis. |
| GetChangeInY | Convinence function to calculate the change in the Y axis. |
| GetCustomLeftDirection | This function returns a normalized number that is the sum of the current facing and the angle to target. |
| GetCustomRightDirection | This returns a float that is a normalized remainder of fDirection - fAngle. |
| GetFarLeftDirection | This function returns a normalized number that is +135 from the current facing. |
| GetFarRightDirection | Returns a normalized number that is -135 from the current facing. |
| GetFlankingLeftLocation | Returns a location on the left flank of the target. |
| GetFlankingRightLocation | Returns a location that is the right flank (to the right and slightly behind) the Target. |
| GetForwardFlankingLeftLocation | Returns location to the forward left flank of the target. |
| GetForwardFlankingRightLocation | Returns location to the forward right flank of the target. |
| GetHalfLeftDirection | This function returns a number that is +45 degrees from the current facing. |
| GetHalfRightDirection | Returns a normalized value that is -45 from fDirection. |
| GetLeftDirection | This function returns a float representing a direction +90 degrees. |
| GetNormalizedDirection | Internal function. This function returns a float that is constrained from 0 - 360. |
| GetOppositeDirection | Returns a normalized direction that is -180 from fDirection. |
| GetOppositeLocation | Returns a location that is directly behind the target. |
| GetRightDirection | Returns a normalized float that is -90 from the facing passed in. |
| GetStepLeftLocation | Returns location just a step to the left. |
| GetStepRightLocation | Returns location just a step to the right. |
| GetRandomLocation | Get 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. |
| LocationToString | Turn a location into a string. |
| MoveToNewLocation | Tells the object to move to a new location. |
| PrintLocation | Internal function. Prints a location to the logfile. |
| SpeakLocation | Internal function. Make the caller of the function speak a string representation of its current location. |
| TurnToFaceObject | Turns the target object to face another object. |
| VectorToString | Turn a vector into a string. |
author: Charles Feduke, editor: Mistress