Game zone player: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(-added class hierarchy, cleanup)
Line 1: Line 1:
{{lang|title=game_zone_player}}
{{lang|title=game_zone_player}}
{{CD2|CGamePlayerZone|file1=maprules.cpp}}
{{entity|game_zone_player|type=e2}} It is used to count the number of players, dead or alive, within the volume of the brush.  
{{entity|game_zone_player|type=e2}} It is used to count the number of players, dead or alive, within the volume of the brush.  
{{code class|CGamePlayerZone|maprules.cpp}}


==Keyvalues==
==Keyvalues==
{{KV BaseEntity|brush=1|noscroll=0}}
{{KV Targetname}}
 
==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 BaseEntity|noscroll=0}}


==Outputs==
==Outputs==
Line 14: Line 14:
{{IO|PlayersInCount|Fired after a count, and contains the number of players found inside the zone.|param=integer}}
{{IO|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}}
{{IO|PlayersOutCount|Fired after a count, and contains the number of players found outside the zone.|param=integer}}
{{O Targetname}}
 
{{sensor brush}}
{{sensor brush}}

Revision as of 19:51, 26 August 2023

English (en)Translate (Translate)
C++ class hierarchy
CGamePlayerZone defined in C++ maprules.cpp
CRuleBrushEntity
CRuleEntity
CBaseEntity

Template:Entity 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 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
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.