This article's documentation is for the "GoldSrc" engine. Click here for more information.

Env global (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (linkfix)
(-added class hierarchy, intn)
 
Line 1: Line 1:
{{tabs|env_global|goldsrc=1|source=1|main=source}}
{{LanguageBar}}
{{this is a|point entity|name=env_global|engine=GoldSrc}}  It can set a global state which persists between maps. It's useful for having events happen in one map after something have been activated in another.
{{TabsBar|main=gs|base=env_global}}
{{CD|CEnvGlobal|goldsrc=1}}
{{This is a|point entity|name=env_global|engine=GoldSrc}}  It can set a global state which persists between maps. It's useful for having events happen in one map after something have been activated in another.


==Key Values==
==Key Values==
{{ScrollBox|title=Global State|
{{KV|Global State to Set|intn=globalstate|string|The global state which this env_global will set. Can be anything and can be used by {{ent|trigger_auto|engine=goldsrc}} entities to fire a target after this <code>env_global</code> have been activated.}}
{{KV|Global State to Set|string|The global state which this env_global will set. Can be anything and can be used by <code>[[trigger_auto]]</code> entities to fire a target after this <code>env_global</code> have been activated.}}
{{KV|Trigger Mode|intn=triggermode|choices|
{{KV|Trigger Mode|choices|
* 0 : Off
* 0 : Off
* 1 : On
* 1 : On
* 2 : Dead
* 2 : Dead
* 3 : Toggle}}
* 3 : Toggle}}
{{KV|Initial State|choices|
{{KV|Initial State|intn=initialstate|choices|
* 0 : Off
* 0 : Off
* 1 : On
* 1 : On
* 2 : Dead}}
* 2 : Dead}}
}}


==Flags==
== Flags ==
{{fl|1|Set Initial State}}
{{fl|1|Set Initial State}}



Latest revision as of 11:28, 7 October 2024

English (en)Translate (Translate)
C++ Class hierarchy
CEnvGlobal
CPointEntity
CBaseEntity
C++ buttons.cpp

env_global is a point entity available in all GoldSrc GoldSrc games. It can set a global state which persists between maps. It's useful for having events happen in one map after something have been activated in another.

Key Values

Global State to Set (globalstate) <string>
The global state which this env_global will set. Can be anything and can be used by trigger_auto entities to fire a target after this env_global have been activated.
Trigger Mode (triggermode) <choices>
  • 0 : Off
  • 1 : On
  • 2 : Dead
  • 3 : Toggle
Initial State (initialstate) <choices>
  • 0 : Off
  • 1 : On
  • 2 : Dead

Flags

Set Initial State : [1]