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

hl2_gamerules

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

Icon HL2 full.png

hl2_gamerules is a point entity available in Mapbase Mapbase.

Proxy entity for HL2 Gamerules.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by.
Entity Scripts (vscripts) <string>
Name(s) of script files that are executed after all entities have spawned.
Script think function (thinkfunction) <string>
Name of a function in this entity's script scope which will be called automatically.
Default Citizen Type (DefaultCitizenType) <choices>
Overrides the default citizen type.
Player Squad Autosummon Allowed (SetPlayerSquadAutosummon) <choices>
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.
Stunstick Pickup Behavior (SetStunstickPickupBehavior) <choices>
Controls how stunsticks should react to being touched by the player.
Allow SP respawn (SetAllowSPRespawn) <choices>
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

RunScriptFile <string>
Execute a game script file from disk.
RunScriptCode <string>
Execute a string of script source code.
RunScriptCodeQuotable <string>
Execute a string of script source code which converts double apostrophes () to quotation marks for strings.
CallScriptFunction <string>
Call a named function from this entity's Activation Script.
RunScriptFile <string>
Execute a game script file from disk.
ClearScriptScope
Clears this entity's script scope.
Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
KillIfNotVisible
Removes this entity if it is not in a player's viewcone.
KillWhenNotVisible <float>
Removes this entity when it is not in a player's viewcone. You can pass a time for when this should start.
AddOutput <string>
ChangeVariable <string>
Similar to AddOutput, except it changes an internal variable similar to logic_datadesc_accessor instead. Very dangerous, use with care.
PassUser1 <string>
Causes this entity's OutUser1 output to be fired. Can pass any parameter.
PassUser2 <string>
Causes this entity's OutUser2 output to be fired. Can pass any parameter.
PassUser3 <string>
Causes this entity's OutUser3 output to be fired. Can pass any parameter.
PassUser4 <string>
Causes this entity's OutUser4 output to be fired. Can pass any parameter.
FireRandomUser
Fires OnUser1, OnUser2, OnUser3, or OnUser4 with a 25% chance of each.
PassRandomUser <string>
Fires OutUser1, OutUser2, OutUser3, or OutUser4 with a 25% chance of each. Can pass any parameter.
FireOutput <string>
Fires the named output on this entity. Format: '<output name>:<activator>:<caller>:<parameter>:<delay>' (OnDeath:hl3cardgame:gaben). Everything beyond the output name is optional.
RemoveOutput <string>
Removes all instances of the named output on this entity. Wildcards are supported, meaning you could just pass '*' to wipe all outputs from this entity.
AcceptInput <string>
Fires the named input on this entity. Format: '<input name>:<parameter>:<activator>:<caller>:<output ID>' (SetTarget:cheese). Everything beyond the input name is optional. Mind the fact this is arranged differently from FireOutput, having the parameter right after the input name.
CancelPending
Cancels any events fired by this entity that are currently pending in the I/O event queue.
SetLocalOrigin <vector>
Sets this entity's origin in local space, relative to its parent if one exists. Otherwise relative to the world.
SetAbsOrigin <vector>
Sets this entity's origin in the map, always relative to the world origin.
SetLocalVelocity <vector>
Sets this entity's current velocity.
SetLocalAngularVelocity <vector>
Sets this entity's current angular velocity.
AddSpawnFlags <integer>
Adds spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.
RemoveSpawnFlags <integer>
Removes spawnflag(s) from this entity. Many spawnflags have their respective numbers suffixed in this FGD.
AddSolidFlags <integer>
Adds solid flags to this entity.
RemoveSolidFlags <integer>
Removes solid flags from this entity.
SetHealth <integer>
Sets this entity's health.
AddHealth <integer>
Adds to this entity's health.
RemoveHealth <integer>
Removes from this entity's health.
SetMaxHealth <integer>
Sets this entity's max health.
SetEntityName <targetname>
Sets this entity's name that other entities should refer to it by.
SetTarget <targetname>
Sets this entity's target. This is specific to certain entities, particularly logic entities that involve a target.
SetOwnerEntity <targetname>
Sets this entity's owner entity. This has nothing to do with parenting and has more to do with collision and kill credits.
SetThinkNull
Sets this entity's general think function to null. Behavior varies from entity to entity.
Use
More or less replicates the player interacting with an entity. (+USE)
Touch <targetname>
Simulates this entity touching the specified entity.
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.

Outputs

OnKilled
Fires when this entity is removed with the 'Kill' input.
OnUser1
Fires in response to FireUser1 input.
OnUser2
Fires in response to FireUser2 input.
OnUser3
Fires in response to FireUser3 input.
OnUser4
Fires in response to FireUser4 input.
OutUser1 <string>
Fires in response to PassUser1 input. Can pass any parameter.
OutUser2 <string>
Fires in response to PassUser2 input. Can pass any parameter.
OutUser3 <string>
Fires in response to PassUser3 input. Can pass any parameter.
OutUser4 <string>
Fires in response to PassUser4 input. Can pass any parameter.