logic_auto

From Source Entities
Jump to navigation Jump to search

Code classes:

Logic auto.png

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: L4d.pngL4d2-small.png 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
Hl2.pngAsw.pngP2.pngFires when the map is loaded in any way, including from a save.
Css.pngCsgo-small.pngL4d.pngL4d2-small.pngFires when the server loads the map and once at the start of every round/reset.
OnMapTransition
Hl2.pngP2.pngFires when the map is loaded by a level transition.
OnNewGame
Hl2.pngAsw.pngP2.pngFires when the map is loaded directly (map command or reloading from death on a map with no saves).
Css.pngCsgo-small.pngL4d.pngL4d2-small.pngFires when the server loads the map and once at the start of every round/reset.
OnLoadGame
Hl2.pngP2.pngFires when the map is loaded from a saved game.
OnBackgroundMap
Hl2.pngCss.pngL4d.pngAsw.pngP2.pngFires when the map is loaded as a background map (map_background command).
OnMultiNewRound
To do: Description.
OnMultiNewMap
Asw.pngCss.pngCsgo-small.pngFires when the server loads the map and once at the start of every round.
L4d.pngL4d2-small.pngFires when the map loads and at the start of every new round, but not on mission resets.
OnDemoMapSpawn  (only available in L4d2-small.png)
Fires only when the game is loaded in the demo mode, which is no longer available.