logic_auto
Jump to navigation
Jump to search
Code classes:
CLogicAuto
CBaseEntity
(all ents)
logic_auto
is a point entity present in all Source games. It automatically fires outputs for the start of a map/round.
Note: Sometimes, an output may fire before a targeted entity is spawned, causing the IO to fail. If this happens, give inputs a small delay.
Tip: Sometimes info_gamemode
has to be used instead of logic_auto
because logic_auto
's outputs are delayed by a small amount of time.
Games done:
- HL2 (no eps or dm)
- CSS
- CSGO
- P2
- ASW
- L4D
- L4D2
Flags[edit | edit source]
- 1: Remove on fire - Removes the entity after it fires its outputs. Delayed inputs will work. If the global value in Global State to Read was not on, the entity will not remove itself.
Keyvalues[edit | edit source]
- Global State to Read
(globalstate)
<choices>
- A global state which must be set to "On" in order for this entity to fire any outputs. Options are not limited to these (they're from HL2) and any text may be entered.
Internal (actual) Name Editor (SmartEdit) Name 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 is_console Game is running on a console is_pc Game is running on a PC
Outputs[edit | edit source]
- OnMapSpawn
- Fires when the map is loaded in any way, including from a save.
- Fires when the server loads the map and once at the start of every round/reset.
- OnMapTransition
- Fires when the map is loaded by a level transition.
- OnNewGame
- Fires when the map is loaded directly (
map
command or reloading from death on a map with no saves). - Fires when the server loads the map and once at the start of every round/reset.
- OnLoadGame
- Fires when the map is loaded from a saved game.
- OnBackgroundMap
- Fires when the map is loaded as a background map (
map_background
command). - OnMultiNewRound
- To do: Description.
- OnMultiNewMap
- Fires when the server loads the map and once at the start of every round.
- Fires when the map loads and at the start of every new round, but not on mission resets.
OnDemoMapSpawn(only available in )- Fires only when the game is loaded in the demo mode, which is no longer available.