Well, the Goblin Land Mines automatically activate when a unit comes a distance of
x units from them. As a result, you can accurately select the unit that originally triggered the Land Mine by simply picking every unit that is within
x of the Land Mine and creating a dummy spellcaster for every selected unit.
Here's how the trigger should look:
-
Events
-
Unit - Generic Unit Event: A unit (Dies)
-
Conditions
-
Unit-type Comparison: (Unit-type of (Dying Unit)) (Equal to) (Frost Mine)
-
Actions
-
Unit Group - Pick Every Unit in Unit Group and Do Multiple Actions: Pick every unit in (Units within 100* of (Position of (Dying Unit) matching (Owner of (Picked Unit)) (Not Equal to) (Owner of (Dying Unit)) and do (Actions)
-
Unit - Create Units Facing Angle: Create (1) (DummyCaster) for (Owner of (Dying Unit)) at (Position of (Picked Unit)) facing (Default building facing) degrees
-
Unit - Add Expiration Timer: Add a (2.00) second (Generic) expiration timer to (Last Created Unit)
-
Unit - Add Ability: Add (Frost Mine) to (Last Created Unit)
-
Unit - Issue Order Targeting a Unit: Order (Last Created Unit) to (Human Sorceress - Slow)** (Picked Unit)
All the fields that I surrounded in brackets are those that are modifiable by the user in the standard World Editor Trigger Editor.
Take a look at the field that I marked with a single astrisk.
Make sure that the range specified in this field exactly matches the triggering range that you've given the Land Mine in question.
If you do not do this, a single unit might trigger the effect but
several units might be harmed by the spell.
Pay
close attention to the field that I marked with two asterisks.
The order-string for the ability you want to cast is the order-string for the ability that it is based off of. If you base your spell off "Doom", for instance, then the order-string used to make the dummy unit cast that spell is "Neutral Pitlord - Doom".
Try to replicate this trigger in your map and tell me how well it works. Given that no variables are defined for the target unit, there
is a possibility that the trigger run twice simultaneously, which
will mess up the casting of the spells and the units that they are cast upon. However, I somehow find it difficult to believe that two players might accidentally step on two Goblin Land Mines simultaneously.
If this trigger doesn't work the way you intend it to work, don't hesitate to send me a Private Message detailing the problem: I'll be happy to help. Whatever the case may be, good luck with your map!
Lux