Due to the recent resurgence of spam, we have temporarily disabled user creation and page editing/creation as we resolve the issue.
Difference between revisions of "Sequencers"
|(One intermediate revision by the same user not shown)|
|Line 45:||Line 45:|
== Related Pages ==
== Related Pages ==
The [[Bigger Loadouts]] pattern relies on a sequencer to give the player more weapon choices on command.
The [[Bigger Loadouts]] pattern relies on a sequencer to give the player more weapon choices on command
Latest revision as of 2016-06-29T14:09:05
The sequencer will fire its outputs in a specified order. By default, the order is defined by the order in which outputs are connected to the sequencer.
The sequencer can be used in a variety of ways: an ordered list, a table, a case statement, a toggle, etc.
If this is true, the sequencer can keep signalling its outputs.
If false, the sequencer will only signal the outputs once. This is helpful for controlling the order of outputs during a one-time event.
Run One Output Per Signal
When a sequencer receives a signal, either one or all of the outputs can be fired.
Firing all of the outputs at once can be helpful when organizing complex events where the order of logic matters.
Firing one output at a time has many different uses. Some examples include a shop where the player buys upgrades in a certain order, a toggle to alternatively turn on or off an object, or a tiered reward system that gives different rewards based on a player's score/resources.
In multiplayer maps, there may be instances where you use the same sequencer to drive logic for different players. Set Shared Sequence to true if all players will share the same sequencer. Set Shared Sequence to false if each player is required to drive their own sequencer.
If your map has a very complicated sequence of events where later events rely on the outputs of earlier events, a sequencer can be vital to ensure the ordering of your events. Using a sequencer can help prevent some of the bugs that occur when outputs are fired out of the desired order.
The method for reordering outputs is the same as multicasting.
To view the order of outputs on a sequencer, hover over the sequencer and enter Logic Chain Mode (D-pad down on controller) then hold down the options button (Left Ctrl on PC, LT on controller). The output order can be changed in Logic Chain Mode.
Sometimes you want to turn on or off an object with the same input. Since not all objects have a Toggle input (like the Repeater), you can create your own toggle using a Sequencer. Make sure that Repeat Signal is set to true and the Run One Output Per Signal property is also set to true. In the example below, the Cylinder Trigger will be enabled or disabled whenever the sequencer is signalled.
If a sequencer has many outputs, you can move straight to a specific one and fire it. Use the Set Index input, followed by the Signal input. Use the output ordering to set the order, or add a very small time delay to the Signal input.
You can control which index you flip to with a variable. This can let you pick a random start point, reward a player based on a player-driven integer, and move back and forth in a sequence of outputs.
The Bigger Loadouts pattern relies on a sequencer to give the player more weapon choices on command.
The Swap Mod pattern creates a tree using sequencers and uses indexing to navigate to the correct leaf.