Left Integer
Left Action Identifier
Left Field Name
Right Integer
Right Action Identifier
Right Field Name
Negate Left Operand
Not Left Operand
Negate Right Operand
Not Right Operand
Add
Subtract
Multiply
Divide
Remainder
Less Than
Less Than or Equal
Greater Than
Greater Than or Equal
Equal
Not Equal
And
Or
Exclusive Or
Negate Output
Not Output
Destination Action Identifier
Destination Field Name
I understood the basic explaination Myrd gave on it.
destination = operation(left, right)
Where operation would be things like Add, Subtract, Multiply, Divide, etc. With some operators that can work with others.
Left Integer being the value on the left. Instead of that you can use Left Action Identifier and Left Field Name to link to the action that contains the value with the field name matching the param ID belonging to an integer parameter. For example Left Integer is an integer parameter and its field name is "lint".
The same thing for the right value where you use Right Integer, or use Right Action Identifier with Right Field Name.
The destination being where the output will be placed. For this you use the Destination Action Identifier to choose the action it will be placed with Destination Field Name to give it the parameter ID the output will use.
I made a short test script and I got it to work!
MATH. Math Quiz
Left Integer "10"
Right Integer "2"
Add
Destination Action Identifier "<<< Answer >>>"
Destination Field Name "lint"
Activates on Execution "Is the answer 12?"
MATH. Is the answer 12?
Left Action Identifier "<<< Answer >>>"
Left Field Name "lint"
Right Integer "12"
Equal
Activates on Success "Inject Math into a Warrior"
Activates on Failure "Inject Math into a Bowman"
Where <<< Answer >>> is an empty action. Inject Math into a Warrior and Inject Math into a Bowman are Unit Control actions. The first kills a warrior and the second kills a bowman. I ran the map and it killed a warrior. I then went and modfied it so the initial values of 10 and 2 were now 9 and 1, so they could not equal 12 when added by the first math action. I ran the map and a bowman was killed instead. Ta-da!
Originally, I was confused by some of the descriptions. For example the description for Equal is "1 if left and right values are equal, zero otherwise." I thought to myself, okay great this does math but how do I actually test what the value can be if it will only spit out more values. But it is in fact a flag which can be true or false. So for the parameters that say that or similar, they mean (1 = true/success) and (0 = false/failure).
However, they are also just 1 and 0 as values themselves. I editted the 2nd Math MA to have Activates on Execution pointing to a new Unit Control action containing just a dwarf for the subj. I had also added the Destination Action Identifier and Destination Field Name parameters to the 2nd Math action. I made them point to that same Unit Control action with the dwarf with the field name being "kill". That field name is for the Unit Control parameter Kill Monsters where a value of 0 is a soft death and 1 is for a hard death. I ran the script again and it killed a warrior and the dwarf was killed using the hard death.