Game zone player: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (updated template usage.)
Line 1: Line 1:
{{base brush|game_zone_player}}  
{{lang|{{PAGENAME}}}}
 
{{brush ent|game_zone_player}} It is used to count the number of players, dead or alive, within the volume of the brush.  
==Entity description==
It is used to count the number of players, dead or alive, within the volume of the brush.  
 
{{code class|CGamePlayerZone|maprules.cpp}}
{{code class|CGamePlayerZone|maprules.cpp}}


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV BaseEntity|brush=1|noscroll=0}}
{{KV Parentname}}
 
==Inputs==
==Inputs==
{{IO|CountPlayersInZone|Count the number of players in the zone, and fire the corresponding outputs.}}
{{IO|CountPlayersInZone|Count the number of players in the zone, and fire the corresponding outputs.}}
{{I Targetname}}
{{I BaseEntity|noscroll=0}}
{{I Parentname}}


==Outputs==
==Outputs==
Line 21: Line 15:
{{IO|PlayersOutCount|Fired after a count, and contains the number of players found outside the zone.|param=integer}}
{{IO|PlayersOutCount|Fired after a count, and contains the number of players found outside the zone.|param=integer}}
{{O Targetname}}
{{O Targetname}}
{{sensor brush}}
{{sensor brush}}

Revision as of 10:28, 7 October 2022

English (en)Translate (Translate)

Template:Brush ent It is used to count the number of players, dead or alive, within the volume of the brush.

C++ In code, it is represented by theCGamePlayerZoneclass, defined in themaprules.cppfile.

Keyvalues

Inputs

CountPlayersInZone
Count the number of players in the zone, and fire the corresponding outputs.


Outputs

OnPlayerInZone
Fired whenever a count finds a player inside the zone. (!activator is the player.)
OnPlayerOutZone
Fired whenever a count finds a player outside the zone. (!activator is the player.)
PlayersInCount <integerRedirectInput/integer>
Fired after a count, and contains the number of players found inside the zone.
PlayersOutCount <integerRedirectInput/integer>
Fired after a count, and contains the number of players found outside the zone.