env_global

From Valve Developer Community

Jump to: navigation, search

Contents

Entity Description

An entity to control a game-specific global states, it can be used to force the gravity gun to become the super gravity gun among other things.

For this entity to take effect from the map's start, the Set Initial State flag must be checked.

With the Orange Box, the entity can also store a numeric variable, the "counter," which can be added to or set directly (but not subtracted from), much like a math_counter which works across multiple maps.

The properties of this entity apply to the whole map. Multiple instances of this entity within a map may cause errors.

Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • initialstate
<choices> Initial State
Literal Value Description
0 Off
1 On
2 Dead
  • globalstate
<string> Global State to Set
Literal Value Description
"gordon_precriminal" Gordon pre-criminal
"antlion_allied" Antlions are player allies
"suit_no_sprint" Suit sprint function not yet enabled
"super_phys_gun" Super phys gun is enabled
"friendly_encounter" Friendly encounter sequence (lower weapons, etc.)
"gordon_invulnerable" Gordon is invulnerable
"no_seagulls_on_jeep" Don't spawn seagulls on the jeep
"ep2_alyx_injured" Episode 2: Alyx injured
"ep_alyx_darknessmode" Episodic: Alyx darkness mode
  • counter (New with Orange Box)
Sets the initial value of the associated counter.

Inputs

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
  • TurnOn
Set state of global to ON.
  • TurnOff
Set state of global to OFF.
  • Toggle
Toggles state of global between ON and OFF.
  • Remove
Set state of global to DEAD.
  • AddToCounter <integer> (New with Orange Box)
Adds the specified amount to the counter.
  • SetCounter <integer> (New with Orange Box)
Sets the value of the counter.
  • GetCounter (New with Orange Box)
Fires this entity's Counter output.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
  • Counter <integer> (New with Orange Box)
Outputs the integer value of this entity. May depend on global state.
Personal tools