Pages

terça-feira, 2 de maio de 2017

BP Compendium 3: Select

Select


The "Select" action returns one of the values associated with the options that corresponds to the index that is passed as input. This "Select" is generic and can work with several types of variables for the index and for the values of the options. To change the type of the options or the index, right click on the parameter and choose the option "Change Pin Type". To add more options, right-click on the node and choose "Add Option Pin".


Input
  • Option 0, 1… :  Values that can be returned by the Select. The options can be of any type.
  • Index: Value that will determine the option to be returned. The "Index" can be of the type Boolean, Byte, Integer or Enum. 

Output
  • Return Value: The option indicated by the "Index".


Example Usage: 

In a "Respawn" event, the "Select" is being used to get the location of a spawn point based on the value of the integer variable "Spawn Point Index".

Click to enlarge 

In another example the "Index" is an Enum called "Difficult" that has the Easy, Normal and Hard values. The type of options is "Integer" and represents the number of enemies according to the difficulty.

Click to enlarge