- Joined
- Jun 26, 2014
- Messages
- 530
This is the whole trigger:
This is where it fails to add a unit into spNecromancyDmgGroup[forEachNecromancyD]
I first tried with Unit Group - Add Unit but that did not work either. Any suggestions. Damage is still dealt and unit is still picked, but they are not added to the group!?
-
Necromancy Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer forEachNecromancy) from 1 to spNecromancyMui, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Number of units in spNecromancyDummies[forEachNecromancy]) Greater than 0
-
-





Then - Actions
-






Unit Group - Pick every unit in spNecromancyDummies[forEachNecromancy] and do (Actions)
-







Loop - Actions
-








Set tempUnit = (Picked unit)
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(tempUnit is alive) Equal to True
-
-









Then - Actions
-










Set tempPoint[0] = (Position of tempUnit)
-










Set tempPoint[1] = (tempPoint[0] offset by 26.00 towards (Facing of tempUnit) degrees)
-










Unit - Move tempUnit instantly to tempPoint[1]
-










For each (Integer forEachNecromancyD) from 1 to spNecromancyDMui, do (Actions)
-











Loop - Actions
-












Set tempGroup[0] = (Units within 75.00 of tempPoint[1] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of spNecromancyCaster[forEachNecromancy])) Equal to True)))
-












Unit Group - Pick every unit in tempGroup[0] and do (Actions)
-













Loop - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















((Picked unit) is in spNecromancyDmgGroup[forEachNecromancyD]) Equal to False
-
-















Then - Actions
-
















Unit Group - Add all units of tempGroup[0] to spNecromancyDmgGroup[forEachNecromancyD]
-
















Unit - Cause spNecromancyCaster[forEachNecromancy] to damage (Picked unit), dealing spNecromancyDamage[forEachNecromancy] damage of attack type Magic and damage type Normal
-
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















((Picked unit) is A Hero) Equal to True
-
-

















Then - Actions
-


















Unit Group - Remove tempUnit from spNecromancyDummies[forEachNecromancy]
-


















Unit - Kill tempUnit
-
-

















Else - Actions
-
-
-















Else - Actions
-
-
-
-












Custom script: call DestroyGroup(udg_tempGroup[0])
-
-
-










Custom script: call RemoveLocation(udg_tempPoint[0])
-










Custom script: call RemoveLocation(udg_tempPoint[1])
-
-









Else - Actions
-










Unit Group - Remove tempUnit from spNecromancyDummies[forEachNecromancy]
-
-
-
-
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








spNecromancyBool[forEachNecromancy] Equal to True
-
-







Then - Actions
-








Set spNecromancyBool[forEachNecromancy] = False
-








Set spNecromancyIndex = (spNecromancyIndex - 1)
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










spNecromancyIndex Less than or equal to 0
-
-









Then - Actions
-










Set spNecromancyIndex = 0
-










Set spNecromancyMui = 0
-










Set spNecromancyDIndex = 0
-










Set spNecromancyDMui = 0
-










Trigger - Turn off (This trigger)
-
-









Else - Actions
-
-
-







Else - Actions
-
-
-
-
-
-
-
This is where it fails to add a unit into spNecromancyDmgGroup[forEachNecromancyD]
-
For each (Integer forEachNecromancyD) from 1 to spNecromancyDMui, do (Actions)
-

Loop - Actions
-


Set tempGroup[0] = (Units within 75.00 of tempPoint[1] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of spNecromancyCaster[forEachNecromancy])) Equal to True)))
-


Unit Group - Pick every unit in tempGroup[0] and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Picked unit) is in spNecromancyDmgGroup[forEachNecromancyD]) Equal to False
-
-





Then - Actions
-






Unit Group - Add all units of tempGroup[0] to spNecromancyDmgGroup[forEachNecromancyD]
-






Unit - Cause spNecromancyCaster[forEachNecromancy] to damage (Picked unit), dealing spNecromancyDamage[forEachNecromancy] damage of attack type Magic and damage type Normal
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








((Picked unit) is A Hero) Equal to True
-
-







Then - Actions
-








Unit Group - Remove tempUnit from spNecromancyDummies[forEachNecromancy]
-








Unit - Kill tempUnit
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-


Custom script: call DestroyGroup(udg_tempGroup[0])
-
-
I first tried with Unit Group - Add Unit but that did not work either. Any suggestions. Damage is still dealt and unit is still picked, but they are not added to the group!?
