Hl2 gamerules: Difference between revisions
Jump to navigation
Jump to search

Note:While this entity exists in stock
and
, it is mostly used by the engine internally and doesn't have any uses for mapmakers. In
, the developers expanded its functionality by taking inspiration from more modern versions of Source.
Only
Only
No edit summary |
mNo edit summary |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
Proxy entity for HL2 Gamerules. | {{Ent not in fgd|except={{mapbase}}|nolink=1|smalltext=}} | ||
{{ | {{Mapbase topicon}} | ||
[[File:Icon HL2 full.png|left|link=]] | |||
{{CD|CHalfLife2Proxy|file1=1}} | |||
{{This is a|logical entity|name=hl2_gamerules|game=Half-Life 2 series|game1=Portal series|game2=Mapbase}} Proxy entity for HL2 Gamerules. | |||
{{note|While this entity exists in stock {{hl2}} and {{portal}}, it is mostly used by the engine internally and doesn't have any uses for mapmakers. In {{mapbase}}, the developers expanded its functionality by taking inspiration from more modern versions of Source.}} | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV | {{KV Targetname}} | ||
{{ | |||
===Only {{mapbase|4}}=== | |||
{{KV|Default Citizen Type|intn=DefaultCitizenType|choices|Overrides the default citizen type. | {{KV|Default Citizen Type|intn=DefaultCitizenType|choices|Overrides the default citizen type. | ||
*None | :*0 : "None" | ||
*Downtrodden | :*1 : "Downtrodden" | ||
*Refugee | :*2 : "Refugee" | ||
*Rebel | :*3 : "Rebel" | ||
*Unique | :*4 : "Unique" | ||
{{KV|Player Squad Autosummon Allowed|intn=SetPlayerSquadAutosummon| | }} | ||
{{KV|Legacy Flashlight|intn=SetLegacyFlashlight|choices|Sets whether to use the original ''HL2'' and ''Episode One'' flashlight instead of ''Episode Two'''s. 'Default' doesn't change anything.}} | {{KV|Player Squad Autosummon Allowed|intn=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.}} | ||
{{KV|Stunstick Pickup Behavior|intn=SetStunstickPickupBehavior|choices|Controls how stunsticks should react to being touched by the player.}} | {{KV|Legacy Flashlight|intn=SetLegacyFlashlight|choices|Sets whether to use the original ''HL2'' and ''Episode One'' flashlight instead of ''Episode Two'''s. 'Default' doesn't change anything. | ||
{{KV|Allow SP respawn|intn=SetAllowSPRespawn| | :*"" : "Default" | ||
:*0 : "No" | |||
:*1 : "Yes" | |||
}} | |||
{{KV|Stunstick Pickup Behavior|intn=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" | |||
}} | |||
{{KV|Allow SP respawn|intn=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== | ==Inputs== | ||
===Only {{mapbase|4}}=== | |||
{{I|DefaultCitizenType|param=integer|Sets the default citizen type.}} | |||
{{I|SetPlayerSquadAutosummon|param=bool|Sets player squad autosummon.}} | |||
{{I|SetLegacyFlashlight|param=bool|Sets legacy flashlight.}} | |||
{{I|SetStunstickPickupBehavior|param=bool|Sets stunstick pickup behavior.}} | |||
{{I|SetAllowSPRespawn|param=bool|Sets SP respawning.}} | |||
{{ | |||
{{ | |||
{{ | |||
{{ | |||
{{ | |||
{{ | |||
== | ==See also== | ||
* [https://github.com/mapbase-source/source-sdk-2013/blob/7976a21b51aee121c3944c85a7d94571a56fe45a/sp/src/game/shared/hl2/hl2_gamerules.cpp Mapbase definition] | |||
Latest revision as of 03:11, 14 August 2025



![]() |
---|
CHalfLife2Proxy |
![]() |
hl2_gamerules
is a logical entity available in Half-Life 2 series,
Portal series, and
Mapbase. Proxy entity for HL2 Gamerules.




Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Only
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
- DefaultCitizenType <integer >
- Sets the default citizen type.
- SetPlayerSquadAutosummon <boolean >
- Sets player squad autosummon.
- SetLegacyFlashlight <boolean >
- Sets legacy flashlight.
- SetStunstickPickupBehavior <boolean >
- Sets stunstick pickup behavior.
- SetAllowSPRespawn <boolean >
- Sets SP respawning.