Difference between revisions of "IS WORLD POINT WITHIN BRAIN ACTIVATION RANGE"

From GTAMods Wiki
Jump to navigation Jump to search
(Added page, with explanation of brains.)
 
(Clarification)
Line 11: Line 11:
 
World point refers to a position defined in ambient*.ipl.
 
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.
+
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]].
 
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]].

Revision as of 04:50, 2 January 2015

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.