Data Types \ Number \ Variable
Set
Has two options:
-
By Value:
The Set number variable response enables user to set a value by either typing in a numerical value in the value field or by attaching a value or a variable node to that port. Then once the response is executed, the variable value can be acquired through the Value port.
Example
In this example, a Set number variable is used to assign the value of Variable1 once the user triggers the object named Activate, and the new value is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR Experience.
-
By Expression
The Set number variable by expression response enables user to set a value by either typing in an expression in the expression field or by attaching a value or a variable node to that port. Then once the response is executed, the variable value can be acquired through the Value port.
Example
In this example, a Set Number Variable By Expression is used to set the result of the sum of Variable1 and Variable2 once the user triggers the object named Activate. The new value is then written in the Result variable, which can be connected to a variable writer to be displayed during the VR experience.