• 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.

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

Status
Not open for further replies.
Level 1
Joined
Mar 29, 2023
Messages
1
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!
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,391
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.
Top