<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.teamspec.net/index.php?action=history&amp;feed=atom&amp;title=Level_Editor%2FWorkflows%2FOutputs_and_logic</id>
	<title>Level Editor/Workflows/Outputs and logic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.teamspec.net/index.php?action=history&amp;feed=atom&amp;title=Level_Editor%2FWorkflows%2FOutputs_and_logic"/>
	<link rel="alternate" type="text/html" href="https://wiki.teamspec.net/index.php?title=Level_Editor/Workflows/Outputs_and_logic&amp;action=history"/>
	<updated>2026-10-29T03:59:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.teamspec.net/index.php?title=Level_Editor/Workflows/Outputs_and_logic&amp;diff=101&amp;oldid=prev</id>
		<title>TeamSpecBot: Level Editor: outputs and map logic workflow</title>
		<link rel="alternate" type="text/html" href="https://wiki.teamspec.net/index.php?title=Level_Editor/Workflows/Outputs_and_logic&amp;diff=101&amp;oldid=prev"/>
		<updated>2026-10-20T03:47:52Z</updated>

		<summary type="html">&lt;p&gt;Level Editor: outputs and map logic workflow&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A map can wire itself up without a script, the way Hammer maps do. When something happens to one entity (a player walks into a zone, a door finishes opening, a button is pressed) it fires an &amp;#039;&amp;#039;&amp;#039;output&amp;#039;&amp;#039;&amp;#039;, which sends an &amp;#039;&amp;#039;&amp;#039;input&amp;#039;&amp;#039;&amp;#039; to another entity by its name (open that door, add one to that counter).&lt;br /&gt;
&lt;br /&gt;
Some things you can build this way: a zone that opens a door half a second after a player walks in; a button that rings a bell; a timer that opens and shuts a gate every ten seconds; three switches that must all be pressed before a hatch unlocks.&lt;br /&gt;
&lt;br /&gt;
The game runs it all on the server, with or without a gamemode script. What players see of it (a door moving, a button&amp;#039;s sound) reaches them as usual.&lt;br /&gt;
&lt;br /&gt;
== What fires outputs and takes inputs ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Entity !! Events (fires) !! Inputs (takes)&lt;br /&gt;
|-&lt;br /&gt;
| [[Level Editor/Entities/Zone|Zone]] (a brush with Is Area) || OnEnter, OnExit, OnFirstEnter, OnLastExit, OnUse || Enable, Disable, Toggle&lt;br /&gt;
|-&lt;br /&gt;
| [[Level Editor/Entities/Door|Door]] || OnOpen, OnFullyOpen, OnClose, OnFullyClosed, OnLockedUse || Open, Close, Toggle, Lock, Unlock&lt;br /&gt;
|-&lt;br /&gt;
| [[Level Editor/Entities/Button|Button]] || OnPressed, OnUseLocked || Press, Lock, Unlock&lt;br /&gt;
|-&lt;br /&gt;
| [[Level Editor/Entities/Logic entities#Logic Relay|Logic Relay]] || OnTrigger || Trigger, Enable, Disable, Toggle, CancelPending&lt;br /&gt;
|-&lt;br /&gt;
| [[Level Editor/Entities/Logic entities#Logic Timer|Logic Timer]] || OnTimer || Enable, Disable, Toggle, FireTimer, RefireTime&lt;br /&gt;
|-&lt;br /&gt;
| [[Level Editor/Entities/Logic entities#Logic Counter|Logic Counter]] || OutValue, OnHitMin, OnHitMax || Add, Subtract, SetValue, Enable, Disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Relays, timers and counters are points: click to place one. Doors and buttons are made from a selection: select the brushes and props, then choose the menu item.&lt;br /&gt;
&lt;br /&gt;
== Names ==&lt;br /&gt;
An output reaches its target by &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* a door, button, relay, timer or counter by its name in the [[Level Editor/Panels/Scene tree|scene tree]] (rename it there);&lt;br /&gt;
* a zone by its &amp;#039;&amp;#039;&amp;#039;Trigger Name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
Every entity of that name takes the input, so two zones called &amp;#039;&amp;#039;Spawn Room&amp;#039;&amp;#039; are reached together. &amp;#039;&amp;#039;&amp;#039;!self&amp;#039;&amp;#039;&amp;#039; means the entity firing the output.&lt;br /&gt;
&lt;br /&gt;
== Adding an output ==&lt;br /&gt;
# Select the entity that fires it.&lt;br /&gt;
# In the inspector, open &amp;#039;&amp;#039;&amp;#039;Outputs&amp;#039;&amp;#039;&amp;#039; and click &amp;#039;&amp;#039;&amp;#039;Add Output&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Fill in the row: &amp;#039;&amp;#039;&amp;#039;On&amp;#039;&amp;#039;&amp;#039; (the event), &amp;#039;&amp;#039;&amp;#039;→&amp;#039;&amp;#039;&amp;#039; (the target name; &amp;#039;&amp;#039;&amp;#039;▾&amp;#039;&amp;#039;&amp;#039; picks from the map&amp;#039;s named entities), the &amp;#039;&amp;#039;&amp;#039;input&amp;#039;&amp;#039;&amp;#039;, and if needed a &amp;#039;&amp;#039;&amp;#039;parameter&amp;#039;&amp;#039;&amp;#039; (Add 5, SetValue 0, RefireTime 2.5), a &amp;#039;&amp;#039;&amp;#039;delay&amp;#039;&amp;#039;&amp;#039; in seconds, &amp;#039;&amp;#039;&amp;#039;Once&amp;#039;&amp;#039;&amp;#039; (fire only the first time) and a &amp;#039;&amp;#039;&amp;#039;Team&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
Each change is one undo step. Details of every field are on [[Level Editor/Panels/Inspector#Outputs|Inspector: Outputs]].&lt;br /&gt;
&lt;br /&gt;
An output that names nothing in the map is kept, but the export warns about it (&amp;#039;&amp;#039;output names &amp;#039;...&amp;#039;, which nothing in the map is called; the game drops it&amp;#039;&amp;#039;) and the game ignores it.&lt;br /&gt;
&lt;br /&gt;
== The activator and teams ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;activator&amp;#039;&amp;#039;&amp;#039; is the player who set the chain off. It travels down the chain: a zone&amp;#039;s OnEnter that triggers a relay that opens a swinging door opens it away from the player who walked in.&lt;br /&gt;
&lt;br /&gt;
An output&amp;#039;s &amp;#039;&amp;#039;&amp;#039;Team&amp;#039;&amp;#039;&amp;#039; fires it only when the activator is on that team. On a zone&amp;#039;s &amp;#039;&amp;#039;&amp;#039;OnFirstEnter&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;OnLastExit&amp;#039;&amp;#039;&amp;#039; it means that team&amp;#039;s first in and last out, whoever else is there. So &amp;#039;&amp;#039;OnFirstEnter → Gate, Open, Team 2&amp;#039;&amp;#039; with &amp;#039;&amp;#039;OnLastExit → Gate, Close, Team 2&amp;#039;&amp;#039; keeps a door open while any player of team 2 is in the zone, whether an enemy stands beside them or not.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A door that opens when you walk in, after half a second:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Zone &amp;#039;&amp;#039;Entry&amp;#039;&amp;#039;: OnEnter → &amp;#039;&amp;#039;Gate&amp;#039;&amp;#039;, Open, delay 0.5.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A gate that opens and shuts every ten seconds:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Logic Timer, Interval 10: OnTimer → &amp;#039;&amp;#039;Gate&amp;#039;&amp;#039;, Toggle.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Three switches unlock a hatch:&amp;#039;&amp;#039;&amp;#039; see [[Level Editor/Entities/Logic entities#Example: three switches unlock a hatch|Logic entities]].&lt;br /&gt;
&lt;br /&gt;
== In the game ==&lt;br /&gt;
Every fired output goes into one queue that the server works through once a tick. An output with no delay lands in the same tick it fires. A chain that keeps firing itself with no delay stops after a thousand outputs in one tick and carries on in the next. Nothing waits in the queue unless something happened, so a map&amp;#039;s logic costs nothing while nothing is going on.&lt;br /&gt;
&lt;br /&gt;
== From a gamemode ==&lt;br /&gt;
A server script can join in: [[Level Editor/Scripting/Reference/GamemodeServerApi#fire_input|api.fire_input]] sends any input as an output would, [[Level Editor/Scripting/Reference/GamemodeServerApi#counter_value|api.counter_value]] reads a counter, and the &amp;lt;code&amp;gt;_logic_event&amp;lt;/code&amp;gt; hook hears relay, timer, counter and button events. See [[Level Editor/Scripting/Map entities|Map entities]].&lt;br /&gt;
&lt;br /&gt;
== Related pages ==&lt;br /&gt;
* [[Level Editor/Panels/Inspector#Outputs|Inspector: Outputs]]&lt;br /&gt;
* [[Level Editor/Entities/Logic entities|Logic entities]]&lt;br /&gt;
&lt;br /&gt;
{{Level Editor nav}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Level Editor]]&lt;br /&gt;
[[Category:Level Editor workflows]]&lt;/div&gt;</summary>
		<author><name>TeamSpecBot</name></author>
	</entry>
</feed>