IS WORLD POINT WITHIN BRAIN ACTIVATION RANGE

From GTAMods Wiki
Revision as of 04:41, 2 January 2015 by MulleDK19 (talk | contribs) (Added page, with explanation of brains.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 startup script calls REGISTER_WORLD_POINT_SCRIPT_BRAIN to register one of these world points to a script, which will allow the script 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.