with field
Vector field
Makes a calculation or logic tag work element by element.
Applies to...
The add, sub, mul, div, and, or and xor tags.
Sample usage
<add 1,10,-2 with=2> generates 3, 12, 0.
<mul 2,3 with=10,100> generates 20, 300.
<add 2,1 with=1,10,20> generates invalid (the lists have different lengths).
Behaviour
Without with, the tag combines all the values in its primary field into one result. With with, it generates several results:
- If with has one value, it is combined with each value in the primary field.
- If the primary field has one value, it is combined with each value in with.
- If both have the same number of values, they are combined in pairs: first with first, second with second, and so on.
- If both have several values but different numbers of them, the result is invalid.