Now that the solution has been declared, let me tell you what really happened in your trigger (OP).
This what causes your trigger to function
randomly.
-
(Triggering unit) Equal to (Random unit from Human_Guards)
Let's say you have 5 units in that Unit Group;
Unit[1]
Unit[2]
...
Unit[5]
Situation:
A unit dies - therefore it is registered as (Triggering unit).
Let's say the unit dies hold to the value Unit[3].
Therefore the comparison would look like this:
Unit[3] Equal to Unit[RandomNumber]
Let's say the RandomNumber is generated and it holds the value of 4;
Unit[3] Equal to Unit[4]
This condition is false, right ?
Therefore the trigger will never be fired.
That's why when you change the condition parameter (from random to IsInGroup), it works.
Because the condition is 100% right.
The original condition has a chance of: 100 / NumberOfUnit
If it has 5 units, the chance is 20% to be fired.
@TriggerHappy
TriggerUnit does not get overwritten, it can still retain MUI-ness if you include Wait in it.
As if (Triggering unit) acts as local unit variable.