env_global

From Sven Co-op
Revision as of 23:29, 27 January 2019 by GeckonCZ (talk | contribs) (Import of converted entguide pages from Sven Manor.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
env_global
Type

point

Status

supported

 


The env_global entity provides the decisive functionality for allowing entity-interaction between maps. More accurately, it allows you to create/set a global variable by a name of your choice. Global variables are set to a use-type of 'On' or 'Off', which can then be used by some entities as their state. E.g. the multisource entity can be set to read its state from a global variable at map load, unless you are having triggers targeting it. This could, for example, be used to make a key for some door collected in one map allow a specific door to be opened in another map.

1 Keyvalues

Global state to set : globalstate

Name of the global state to set. If it does not exist, it will be created.

Trigger mode : triggermode

How to set the global state. Shall it be set to 'On', 'Off', or shall its current state be toggled? If you specify 'Dead', that will delete the global state if it exists.

Initial state : initialstate

If the 'Set initial state'-flag is set, the given global state will be set to the state specified here. 'Dead' removes the global state in case it exists and should act before any entities can read its global state and won't read anything at all, resulting in default behaviour. For some reason, 'Toggle' is not an option here, possibly because of the undefined case of a non-existing/'uninitialized' global state being told to toggle.

2 Flags

1 : Set initial state

If set, the given global state will be set to the given initial state on map load.