Hey! I was creating an ability that increases the intelligence of my hero by 1 everytime he kills a unit, the trigger works fine but is not MUI at all, meaning if i kill more than 1 unit at a time the other effects will freeze. Any help with how i transform this into MUI? Thanks in advance.
-
Sacrifice
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Level of Sacrifice for (Killing unit)) Equal to 1
-
-
Actions
-
Set VariableSet Sacrifice_TU = (Killing unit)
-
Set VariableSet Sacrifice_LocTu = (Position of Sacrifice_TU)
-
Set VariableSet Sacrifice_LocDead = (Position of (Dying unit))
-
Unit - Create 1 Dummy Sacrifice for (Owner of Sacrifice_TU) at Sacrifice_LocTu facing (Angle from Sacrifice_LocDead to Sacrifice_LocTu) degrees
-
Set VariableSet Sacrifice_Soul = (Last created unit)
-
Trigger - Turn on Sacrifice Loop <gen>
-
-
-
Sacrifice Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Sacrifice_LocTu and Sacrifice_LocDead) Greater than or equal to 10.00
-
-
Then - Actions
-
Unit - Move Sacrifice_Soul instantly to (Sacrifice_LocDead offset by 12.00 towards (Angle from Sacrifice_LocDead to Sacrifice_LocTu) degrees.), facing (Angle from Sacrifice_LocDead to Sacrifice_LocTu) degrees
-
Set VariableSet Sacrifice_LocDead = (Position of Sacrifice_Soul)
-
Set VariableSet Sacrifice_LocTu = (Position of Sacrifice_TU)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between Sacrifice_LocTu and Sacrifice_LocDead) Less than or equal to 25.00
-
-
Then - Actions
-
Unit - Kill Sacrifice_Soul
-
Unit - Remove Sacrifice_Soul from the game
-
Special Effect - Create a special effect at Sacrifice_LocDead using Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
-
Special Effect - Set Scale of (Last created special effect) to 2.00
-
Special Effect - Destroy (Last created special effect)
-
Hero - Modify Intelligence of Sacrifice_TU: Add 1.
-
Set VariableSet Sacrifice_IntGain = (Sacrifice_IntGain + 1)
-
Ability - Set Extended Tooltip of Sacrifice to (Collects the souls of the enemies slain by the Cursed Noble, each soul gives |cff0080C01 intelligence|r. Because of the pact, all souls are lost on death. |n|n|cff0080C0Souls Collected: + ((String(Sacrifice_IntGain)) + .|r)) for level 0
-
Custom script: call RemoveLocation(udg_Sacrifice_LocTu)
-
Custom script: call RemoveLocation(udg_Sacrifice_LocDead)
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
Sacrifice Dies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Dying unit) Equal to Sacrifice_TU
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Sacrifice_Soul is alive) Equal to True
-
-
Then - Actions
-
Trigger - Turn off Sacrifice Loop <gen>
-
Unit - Kill Sacrifice_Soul
-
Unit - Remove Sacrifice_Soul from the game
-
Hero - Modify Intelligence of Sacrifice_TU: Subtract Sacrifice_IntGain.
-
Set VariableSet Sacrifice_IntGain = 0
-
-
Else - Actions
-
-
-