D
Dr4gonL0rd
Guest
Bah!
In my map, player's can add the Locust ability to units that they can spawn to make them unselectable. Normally, a player would select a unit and then type '-remove' to remove the selected unit, but I have a unit with an AOE spell as well as a trigger along with it to remove these units, but it is not working on the units with Locust.
How can I get the trigger to remove the units? The spell is able to target "Invulnerable" units.
In my map, player's can add the Locust ability to units that they can spawn to make them unselectable. Normally, a player would select a unit and then type '-remove' to remove the selected unit, but I have a unit with an AOE spell as well as a trigger along with it to remove these units, but it is not working on the units with Locust.
Code:
Remove Ability Red
Events
Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
Conditions
(Ability being cast) Equal to Delete Unit
(Unit-type of (Triggering unit)) Equal to Delete Unit
Actions
Set TempCaster = (Casting unit)
Set TempPoint = (Target point of ability being cast)
Set TempGroup = (Units within 100.00 of TempPoint matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))
If (((TempCaster is in TempGroup) Equal to False) and ((Delete Unit 0008 <gen> is selected by Player 1 (Red)) Equal to True)) then do (Unit Group - Pick every unit in TempGroup and do (Unit - Remove (Picked unit) from the game)) else do (Do nothing)
Custom script: call DestroyGroup (udg_TempGroup)
Custom script: call RemoveLocation (udg_TempPoint)