Why does this crash the game after ~10 seconds (several units die inbetween)?
VeterancyLevels is an ability array with indices from 0 to 6,
VeterancyLevelsBuffs is a buff array with indices from 0 to 6,
TempUnit is a unit variable.
The trigger is supposed to check for dummy abilities giving buffs, remove the dummy ability and buff, and add a dummy ability that is next on the index. It isn't supposed to do anything when it has the dummy ability with index 6.
VeterancyLevels is an ability array with indices from 0 to 6,
VeterancyLevelsBuffs is a buff array with indices from 0 to 6,
TempUnit is a unit variable.
The trigger is supposed to check for dummy abilities giving buffs, remove the dummy ability and buff, and add a dummy ability that is next on the index. It isn't supposed to do anything when it has the dummy ability with index 6.
-
Veterancy
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Actions
-
Set TempUnit = (Killing unit)
-
For each (Integer A) from 0 to 5, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering player) is giving (Owner of TempUnit) Alliance (non-aggression)) Equal to False
-
(Level of VeterancyLevels[(Integer A)] for TempUnit) Equal to 1
-
(Level of VeterancyLevels[6] for TempUnit) Not equal to 1
-
-
Then - Actions
-
Unit - Remove VeterancyLevels[(Integer A)] from TempUnit
-
Unit - Remove VeterancyLevelsBuffs[(Integer A)] buff from TempUnit
-
Unit - Add VeterancyLevels[((Integer A) + 1)] to TempUnit
-
Skip remaining actions
-
-
Else - Actions
-
-
-
-
-
Last edited: