Documentation by TAPgiles

Exclusive Gate

When a gate is open, allows a signal through it. Only one gate with the same name, depending on certain rules. (Ac) On the face of the gadget, a gate icon shows if that gate is currently open or closed.

In this way there are similarities to the Selector gadget, for which only one channel can be active at a time.

Exclusive gates are grouped by the name of the exclusive gate gadget. (Tg) Each group can have at most one open gate within it.

For example, exclusive gate “A” will be part of the same group as another exclusive gate named “A” but not part of a group containing exclusive gate “B.”

Note that in edit mode, gates may show themselves to be open based on sending inputs and such before playing time. But when time is played, everything will be reset and the correct state will be shown.

Memory: Costs 0.0061% of the things limit per gadget.

Tweak Menu

# Gate Input

The signal to output when the gate is open.

While receiving a positive signal, this gate is requesting to be opened. (Tg)

# Gate Output

Sends the input signal while the gate is open, or “active.” (Tg)

# Gate Sync

With no wires connected to it, syncing defaults to on. If there is anything wired into it syncing will be on while receiving a positive signal, and off while receiving a negative signal.

Wired Signal Syncing
-
> 0
<= 0

While on, the gate will open and close as dictated by the other settings. While off, the gate’s state will not change unless there are no other gates in the priority pool. (Ac) (Tg)

Changing priority of this gate, or activating “interrupt” on another gate will override this behaviour while gate sync is off.

# Close Gate

When triggered, the gate will be closed. (Ac) (Tg)

When in Automatic mode, the same ex-gate would immediately become active again. So for practical purposes, this does nothing in Automatic mode.

# Active

Sends a signal while this gate is currently open. (Tg)

For most cases, the rules for which exclusive gate in the group should be active is simple. But the full rules are complex to cover all edge cases.

Here are some sources you may find useful, to understand the innards. Explanation from Media Molecule. Explanation on DreamSchool.

When a gate is open (or “active”) the received signal is output.

A gate will request to be opened if:

This applies even if the gate was recently closed.

A gate will automatically close if another gate with a higher priority is requesting to be opened. (Ties are broken by the highest value received by the gates’ Input, but a gate will not be closed if another has a higher tie-breaker.)

If the currently active gate is not syncing it cannot be closed, and therefore another gate in the group cannot open.

While there are no open gates, gates requesting to be opened are filtered down until only 1 remains. The following filters are applied in order:

The remaining gate is then opened.

When an active gate is powered off it retains its open status. When turned on again, if it is able to request to be opened it will be opened.

If in queue mode, a new gate will be found from the gates requesting to be opened.

# Priority

If a gate could turn on and it has a higher priority than any other gate that could turn on, this gate turns on. (Ac) (Tg)

While sharing the highest priority with other gates, the value received by Gate Input is used to break the tie. (Tg)

When a gate that is receiving a positive value has a higher priority than the currently active gate, that gate is closed and this gate is opened.

# Scope

# Interrupt

When triggered and this gate has the same priority as other gates in the queue, this gate skips to the next one in the queue. (Tg)

If a positive signal is currently being input to the gate, this gate becomes open and all others close. If the input signal is 0, this gate will be the next one to open. (Ac)

# Reset Mode

The algorithm to use for when this gate will be reset.

# Gate Colour

Sets the colour of the gadget. (Tg)