segunda-feira, 23 de janeiro de 2017

BP Compendium 3: Sequence

Sequence


A "Sequence" can be used to help organize other Blueprints Actions. When it is triggered it executes all the Actions connected to the output pins in order, that is, it executes all the actions of pin 0, then all the actions of pin 1 and so on.

Output pins can be added using the "Add pin +" option. To remove a pin, right-click the pin and choose the "Remove execution pin" option.


Example Usage:

The "Sequence" action is very simple to use, but if combined with other Actions it may present some interesting behaviors. The example below shows how to make a weapon that fires continuously when the left mouse button is pressed and only stops firing when the button is released.

Click to enlarge

The Sequence is being used in conjunction with the "Gate" Action. When the left mouse button is pressed, the pin 0 of the "Sequence" is used to open the "Gate" and allow the actions of the "Exit" pin to be executed when the "Enter" pin is triggered. After the "Gate" is open, the pin 1 of the "Sequence" continues execution through the "Enter" pin of the "Gate".


The Action "Spawn Actor Bullet" creates a bullet at the level based on a Blueprint called "Bullet". After this, the Action "Delay" waits half a second to enter again the "Enter" pin of the "Gate" and repeat the creation of the bullet.

This cycle will only be interrupted when the left mouse button is released causing the "Close" pin of the "Gate" to be triggered, preventing the actions of the "Exit" pin from being executed.


Table of Contents