• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Trying to recreate Meepo's (from DOTA) Death Trigger.

Status
Not open for further replies.

Sketsketch

S

Sketsketch

Hi, I made a hero for my map that has the same ultimate as Meepo from DOTA and DOTA 2 but my current trigger regarding all Meepos dying if one of them dies is not working all the time. Does anyone know any solutions for this? Thank you!
 
Hello, so how exactly are you trying to do it?
The easiest method that comes to mind is to use the Pick Every Unit action and find all Meepos owned by the Owner of the (Dying) Meepo and simply kill them off as well.
  • Meepo Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Meepo
    • Actions
      • Trigger - Turn off (This trigger)
      • Set Variable TempUnitGroup = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to Meepo) and (((Matching unit) is alive) Equal to True)).)
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Trigger - Turn on (This trigger)
The unit group variable/custom script stuff is there to prevent a memory leak. It's optional but recommended to keep your map performing well.

Note that the Event "A unit Dies" will not happen if you REMOVE a unit from the game. This is different from KILLING a unit.
 
Last edited:
Status
Not open for further replies.
Back
Top