I have a set of variables that once an event is triggered, all roll random numbers. (Each variable has many possible modifiers so using one variable, while simpler, is not really possible)
After they all roll random numbers, I need a way to set another variable to match the value of the variable that rolled the highest.
For example:
Variable 1 rolled 10
Variable 2 rolled 20
Variable 3 rolled 15
Variable 4 is not random, but instead equals the highest value of the previous variables (In this example, Variable 2)
What I need is a way to set Variable 4 to equal 20 as well, as it was the highest roll. I know I could use conditional branches to compare all of the values, but that gets unorganized quickly, and makes tweaking certain things in the future difficult, considering I have many variables that are going to be rolled.
Is there a simple, clean, script I could use?
After they all roll random numbers, I need a way to set another variable to match the value of the variable that rolled the highest.
For example:
Variable 1 rolled 10
Variable 2 rolled 20
Variable 3 rolled 15
Variable 4 is not random, but instead equals the highest value of the previous variables (In this example, Variable 2)
What I need is a way to set Variable 4 to equal 20 as well, as it was the highest roll. I know I could use conditional branches to compare all of the values, but that gets unorganized quickly, and makes tweaking certain things in the future difficult, considering I have many variables that are going to be rolled.
Is there a simple, clean, script I could use?