How to add the value of two variables

How do I add the value of two or more variables to check and see if their combined value is over a certain number. For example, if variable 1 plus variable 2 is greater than 100 do xyz.


Use the compare two numbers condition instead of the variable specific one. The variable specific condition is exclusively for a single variable.

This didn’t quite work because I’m adding 5-10 variable values or object values to see if their combined value is greater than a certain number. Do you know another way?

How are you deciding which indexes get added together? Is it going to be fixed or will it be more dynamic and different ones?

Not sure what you are meaning here. The Compare two numbers condition allows for infinite number of expressions on either side. Just put all of your variables and object values on one side of the condition, with + between each, and the number you want to conpare against on the other side.

[solved] Thank you. I put all objects in one group, gave each object an object variable that was a number variable (all of these object variables had the same name), and then numbered each object variable (1-10). Then I made a separate scene variable that was an array with the same number of children as the number of objects. Then wrote the following event and condition to assign object variable values in real time to the scene variable:
Event:
The number of the animation of OBJECTGROUP =2
Condition:
Change the scene variable Grid[OBJECTGROUP.Variable(objectvariablename)] set to 1

Then I compared two values to check if the value of a certain segment of the total group has reached a certain value:
Condition:
Grid[1]+Grid[2]+Grid[3]+Grid[4] is greater than or equal to 3
Event:
Do xyz