LordSaddler1
New Member
- Reaction score
- 4
In my ability that is a variant of the Sentinel ability, I made it so it makes a dummy unit that attacks, at the position of the destructable of the ability being cast. I want there to be a max amount that can be summoned, and that when you summon over the max amount, it kills the FIRST one that you created. I've pinpointed the error in my trigger to this loop. Please tell me what is wrong with it. It is supposed to set SentinelDummy[1] to SentinelDummy[2], and so on.
Code:
Sentinel
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sentinel
Actions
Set Mistress_Caster = (Triggering unit)
Unit - Create 1 Sentinel Dummy for (Owner of Mistress_Caster) at (Position of (Target destructible of ability being cast)) facing (Center of (Playable map area))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Sentinel for Mistress_Caster) Equal to 1
Then - Actions
Unit - Remove Sentinel_Dummy[2] from the game
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Set Sentinel_Dummy[(2 - (Integer A))] = Sentinel_Dummy[(3 - (Integer A))]
Set Sentinel_Dummy[1] = (Last created unit)
Else - Actions