quarta-feira, 1 de junho de 2016

BP Compendium 2: Structures

Structures


A structure can be used to gather in one place several related variables. The variables that belong to a structure can be of different types. You can also have structures that contain other structures and arrays.

To create a new structure, click the "Add New" button and in the submenu "Blueprints" select "Structure". Double-click the structure that was created to edit it. Click the "New Variable" button to add variables to the structure.



As an example will be created a variable to represent the Inventory of the player. Create a new variable in a Blueprint named "Inventory" using the the structure type that was created. Click the icon next to the type to make this an Array variable. Compile the Blueprint. In the "Default Value" of the variable you can add elements in the inventory. Each element contains the variables defined in the structure.



When a structure is created, the Actions "Break" and "Make" of this structure are added for use in the Blueprint. The Action "Break" receives a structure as input and separates its elements. The Action "Make" receives as input the separate elements and creates a new structure. The image below shows the Actions "Break" and "Make" of the structure "ItemStruct" that was created.

Click to enlarge 


Table of Contents