IS WORLD POINT WITHIN BRAIN ACTIVATION RANGE

From GTAMods Wiki
Revision as of 04:50, 2 January 2015 by MulleDK19 (talk | contribs) (Clarification)
Jump to navigation Jump to search
IS_WORLD_POINT_WITHIN_BRAIN_ACTIVATION_RANGE
Number of parameters: 0
Return value:
TypeDescription
booleantrue, if within range; otherwise, false.

Returns whether the calling script's world point is within its desired range from the player. World point refers to a position defined in ambient*.ipl.

The world points specify a position and the name of a script.

The startup script calls REGISTER_WORLD_POINT_SCRIPT_BRAIN to register the world points to their scripts, which will allow the scripts to run when the player gets close to the point.


When a script with a registered world point calls IS_WORLD_POINT_WITHIN_BRAIN_ACTIVATION_RANGE, the function retrieves the script's registered world point and checks whether the player is currently within the range specified in the call to REGISTER_WORLD_POINT_SCRIPT_BRAIN.