game_zone_player

From Valve Developer Community
Revision as of 16:15, 18 July 2025 by CHILLMODEA (talk | contribs) (Fix partial rewrite of partial rewrite (i messed up a lil))
Jump to navigation Jump to search
English (en)Translate (Translate)
C++ class hierarchy
CGamePlayerZone defined in C++ maprules.cpp
↳CRuleBrushEntity
↳CRuleEntity
↳CBaseEntity

game_zone_player is a brush entity available in all Source Source games. It is used to count the number of players, dead or alive, within the volume of the brush.

Tip.pngTip: 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.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
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.
English (en)Translate (Translate)
Icon-callout-delete.png
This article has been marked as a candidate for speedy deletion because it has been deprecated.
Red x.png
This template (and its redirect) is Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{o}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.
OnPlayerOutZone <void>
Fired whenever a count finds a player outside the zone.
English (en)Translate (Translate)
Icon-callout-delete.png
This article has been marked as a candidate for speedy deletion because it has been deprecated.
Red x.png
This template (and its redirect) is Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{o}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.
PlayersInCount <integerRedirectOutput/integer>
Fired after a count, and contains the number of players found inside the zone.
PlayersOutCount <integerRedirectOutput/integer>
Fired after a count, and contains the number of players found outside the zone.

See Also