This article relates to the game "Mapbase". Click here for more information.

hl2_gamerules

From Valve Developer Community
Revision as of 13:13, 14 April 2025 by Nescius (talk | contribs) (-added class hierarchy, cleanup, not sure what this utilized for in hl2 and portal)
Jump to navigation Jump to search
English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default, except in Mapbase.

Icon HL2 full.png
C++ Class hierarchy
CHalfLife2Proxy
CGameRulesProxy
CBaseEntity
C++ hl2_gamerules.cpp

hl2_gamerules is a point entity available in Half-Life 2 series Half-Life 2 series, Portal series Portal series, and Mapbase Mapbase. Proxy entity for HL2 Gamerules.

Confirm:seems unused as an entity in hl2 and portal


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

Only Mapbase Mapbase

Default Citizen Type (DefaultCitizenType) <choices>
Overrides the default citizen type.
  • 0 : "None"
  • 1 : "Downtrodden"
  • 2 : "Refugee"
  • 3 : "Rebel"
  • 4 : "Unique"
Player Squad Autosummon Allowed (SetPlayerSquadAutosummon) <boolean>
Sets whether citizens are allowed to automatically follow the player again when they're at a command point and left alone for a while.
Legacy Flashlight (SetLegacyFlashlight) <choices>
Sets whether to use the original HL2 and Episode One flashlight instead of Episode Two's. 'Default' doesn't change anything.
  • "" : "Default"
  • 0 : "No"
  • 1 : "Yes"
Stunstick Pickup Behavior (SetStunstickPickupBehavior) <choices>
Controls how stunsticks should react to being touched by the player.
  • 0 : "Only apply energy and disappear (default)"
  • 1 : "Allow pickup, apply energy if already owned"
  • 2 : "Don't apply energy and don't allow pickup"
  • 3 : "Allow pickup, but never apply energy"
Allow SP respawn (SetAllowSPRespawn) <boolean>
Allows players to respawn in singleplayer instead of being forced to reload the last save upon dying. Use OnPlayerSpawn in logic_playerproxy to fire an output each time the player respawns.

Inputs

Only Mapbase Mapbase

DefaultCitizenType <integerRedirectInput/integer>
Sets the default citizen type.
SetPlayerSquadAutosummon <booleanRedirectInput/boolean>
Sets player squad autosummon.
SetLegacyFlashlight <booleanRedirectInput/boolean>
Sets legacy flashlight.
SetStunstickPickupBehavior <booleanRedirectInput/boolean>
Sets stunstick pickup behavior.
SetAllowSPRespawn <booleanRedirectInput/boolean>
Sets SP respawning.

See also