Module DetectionZoneUnit
Detect the intrusion of any player inside the effect zone.
Element class: DetectionZoneUnit
Extends: Element
Functions
getRadius () | Returns the detection zone radius. |
getPlayers () | Returns the list of IDs of the players in the detection zone. |
getSignalOut (plug) | Return the value of a signal in the specified OUT plug of the element. |
EVENT_enter (id) | Deprecated: Event: A player just entered the zone. |
EVENT_onEnter (id) | Event: Emitted when a player enters the detection zone. |
EVENT_leave (id) | Deprecated: Event: A player just left the zone. |
EVENT_onLeave (id) | Emitted when a player leaves the detection zone. |
Functions
- getRadius ()
-
Returns the detection zone radius.
Returns:
-
float
The detection zone radius.
- getPlayers ()
-
Returns the list of IDs of the players in the detection zone. Updates after events fire, so won't be correct in
event handling.
Returns:
-
list
The list of player IDs.
- getSignalOut (plug)
-
Return the value of a signal in the specified OUT plug of the element.
Valid plug names are:
- "out" for the out signal.
Parameters:
- plug string A valid plug name to query.
Returns:
-
0/1
The plug signal state
- EVENT_enter (id)
-
Deprecated: Event: A player just entered the zone.
Note: This is documentation on an event handler, not a callable method.
This event is deprecated: EVENT_onEnter should be used instead.
Parameters:
- id int The ID of the player. Use database.getPlayer.name to retrieve its name.
See also:
- EVENT_onEnter (id)
-
Event: Emitted when a player enters the detection zone.
Note: This is documentation on an event handler, not a callable method.
Parameters:
- id int The ID of the player. Use system.getPlayerName(id) to retrieve its name.
- EVENT_leave (id)
-
Deprecated: Event: A player just left the zone.
Note: This is documentation on an event handler, not a callable method.
This event is deprecated: EVENT_onLeave should be used instead.
Parameters:
- id int The ID of the player. Use database.getPlayer(ID).name to retrieve its name.
See also:
- EVENT_onLeave (id)
-
Emitted when a player leaves the detection zone.
Note: This is documentation on an event handler, not a callable method.
Parameters:
- id int The ID of the player. Use system.getPlayerName(id) to retrieve its name.