How to add together the value of multiple Global Variable Integer’s to create one overall Integer value?
I have various globals, counting and storing Integer’s values – and I have a new global to be used as a total checker… But how do I add up them into one value?
I feel like I should be doing something like ...
Action - Variable Set (my Total global) to 0...
... then ...
Action - Variable Set (my Total global) Increase By Value (from global A)
... followed by ...
Action - Variable Set (my Total global) Increase By Value (from global .
... then I can check my total > 100 etc
But there isn’t an option to do something like that and I can't work out how to do it.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
When dealing with Integer and Float variables, the Variable: Set Action's Method can be set to Formula, which lets you enter in an equation to calculate the new value, i.e.:
However, this box also supports the use of variable tokens, which you can insert to make use of other variable values at runtime:
A variable's replacement token can be found in its list of properties.
Variables can also be updated through script - see the Manual's "Variable scripting" chapter details.