-
Notifications
You must be signed in to change notification settings - Fork 0
4.5 Global Values
The Dialog backend comes with a Global Value System, giving you a bunch of Variables you can define by Name.
The Types are as follow:
• Integer
• Integer64
• Float (Double)
• String
• Name
• Vector
• Vector2D
• IntPoint
• Boolean
• GameplayTag
• Actor-Reference
[Image of Setter and Getter]
Each Variable comes with a Setter and a Getter Function.
So you are able to set and get the values of your Globals within any Blueprint, by Getting the Dialog Backend Subsystem, and calling the corresponding function.
You also can define and set default values in the project Settings, too.
Those will get loaded on Subsystem Startup.
The System also offers a Function to Get and Set a whole Structure of all Globalvalues, for Saving to and Loading from the Game Slot.
To handle Dialog Flow, you need to use the GlobalValues
The Branch uses Globalvalues to compare against each other.
The Event returns a specific collection of values to the Event receivers.
The Beacon is able to create/modify Globalvalues in Dialog Flow.
Also using the Message Commands, you can have these replaced by the actual value of your choice.
While it is not possible to let a Branch Node compare an Integer against a Float, or a String against a Name, you can workaround that pretty easily.
Have a Class in your Level bind to the Subsystem's OnReceivedEventGlobal, and in the bound event, convert a Global Integer to a Global Float.
Call that Event in the Dialog, right before the Branch, to have the integer value being set to a float, for comparison.
A conversion Node is planned for future updates.
I. What is the Dialog Backend?
II. Setting up
|