There proper way to do what you were originally looking for is to loop through the array checking if the trigger unit is the same in the array, which can then be passed onto the actions (ie use the integer the loop is at); there is no need ever to store the integer.
There proper way to do what you were originally looking for is to loop through the array checking if the trigger unit is the same in the array, which can then be passed onto the actions (ie use the integer the loop is at); there is no need ever to store the integer.