Game zone player: Difference between revisions
Jump to navigation
Jump to search

Tip:This entity fires per client, making it useful for multiplayer maps which wants to globally fire per client outputs to each individual player all on the same tick.
(see also) |
m (Substituted IO templates) |
||
Line 7: | Line 7: | ||
==Inputs== | ==Inputs== | ||
{{ | {{I|CountPlayersInZone|Count the number of players in the zone, and fire the corresponding outputs.}} | ||
==Outputs== | ==Outputs== | ||
{{ | {{O|OnPlayerInZone|Fired whenever a count finds a player inside the zone. {{PlAct}}|param=void}} | ||
{{ | {{O|OnPlayerOutZone|Fired whenever a count finds a player outside the zone. {{PlAct}}|param=void}} | ||
{{ | {{O|PlayersInCount|Fired after a count, and contains the number of players found inside the zone.|param=integer}} | ||
{{ | {{O|PlayersOutCount|Fired after a count, and contains the number of players found outside the zone.|param=integer}} | ||
== See Also == | == See Also == |
Revision as of 21:47, 19 April 2025


![]() |
---|
CGamePlayerZone defined in ![]() maprules.cpp
|
game_zone_player
is a brush entity available in all Source games. It is used to count the number of players, dead or alive, within the volume of the brush.

Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
- CountPlayersInZone
- Count the number of players in the zone, and fire the corresponding outputs.
Outputs
- OnPlayerInZone <void>
- Fired whenever a count finds a player inside the zone. (!activator is the player.)
- OnPlayerOutZone <void>
- Fired whenever a count finds a player outside the zone. (!activator is the player.)
- PlayersInCount <integer >
- Fired after a count, and contains the number of players found inside the zone.
- PlayersOutCount <integer >
- Fired after a count, and contains the number of players found outside the zone.