This article's documentation is for anything that uses the Source engine. Click here for more information.

Game zone player: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
m (Fix partial rewrite of partial rewrite (i messed up a lil))
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{CD2|CGamePlayerZone|file1=maprules.cpp}}
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{LanguageBar}}{{CD2|CGamePlayerZone|file1=maprules.cpp}}
{{this is a|brush entity|name=game_zone_player}} It is used to count the number of players, dead or alive, within the volume of the brush.  
{{this is a|brush entity|name=game_zone_player}} It is used to count the number of players, dead or alive, within the volume of the brush.  
 
{{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.}}
__NOTOC__
==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV Targetname}}


==Inputs==
==Inputs==
{{IO|CountPlayersInZone|Count the number of players in the zone, and fire the corresponding outputs.}}
{{I|CountPlayersInZone|Count the number of players in the zone, and fire the corresponding outputs.}}


==Outputs==
==Outputs==
{{IO|OnPlayerInZone|Fired whenever a count finds a player inside the zone. {{PlAct}}|param=void}}
{{O|OnPlayerInZone|Fired whenever a count finds a player inside the zone. {{PlAct}}|param=void}}
{{IO|OnPlayerOutZone|Fired whenever a count finds a player outside the zone. {{PlAct}}|param=void}}
{{O|OnPlayerOutZone|Fired whenever a count finds a player outside the zone. {{PlAct}}|param=void}}
{{IO|PlayersInCount|Fired after a count, and contains the number of players found inside the zone.|param=integer}}
{{O|PlayersInCount|Fired after a count, and contains the number of players found inside the zone.|param=integer}}
{{IO|PlayersOutCount|Fired after a count, and contains the number of players found outside the zone.|param=integer}}
{{O|PlayersOutCount|Fired after a count, and contains the number of players found outside the zone.|param=integer}}
 
== See Also ==
* {{ent|trigger_multiple}}


{{sensor brush}}
{{sensor brush}}

Latest revision as of 16:15, 18 July 2025

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>[ Edit ]
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. (!activator is the player.)
OnPlayerOutZone <void>
Fired whenever a count finds a player outside the zone. (!activator is the player.)
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