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

[Trigger] Kill em

Status
Not open for further replies.
Level 21
Joined
Jul 6, 2014
Messages
6,790
I'm working on a rpg and I need help trying to destroy some units. It is where you must battle a necromancer and whn he dies his minions die aswell

My trigger lloks like this:

Events:
Unit - Necromancer 0020<gen>Dies

Conditions:

Actions:
Unit Group - Destroy unit group(units owned by Necromancers(purple) of type skeleton

It doesn't work because the skeletons stay alive. What did I do wrong?I'm using JNGP
 
Level 4
Joined
Feb 28, 2014
Messages
70
  • Events:
  • Unit - Necromancer 0020 <gen> Dies
  • Conditions:
  • Actions:
  • Custom script: set bj_WantDestroyGroup = Yes
  • Unit Group - Pick ever unit matching (Owner of (Matching Unit) equal to Necromancers ( Purple) and (Unit-Type of (Matching Unit) equal to Skeleton) and do
    • Loop
      • Unit - Kill (Picked Unit)
It should work for you.

The problem is, that you are destrying a UNIT GROUP, not the unit themselves. You have create the unit group and pick them to then kill them.
 
Level 21
Joined
Jul 6, 2014
Messages
6,790
  • Events:
  • Unit - Necromancer 0020 <gen> Dies
  • Conditions:
  • Actions:
  • Custom script: set bj_WantDestroyGroup = Yes
  • Unit Group - Pick ever unit matching (Owner of (Matching Unit) equal to Necromancers ( Purple) and (Unit-Type of (Matching Unit) equal to Skeleton) and do
    • Loop
      • Unit - Kill (Picked Unit)
It should work for you.

The problem is, that you are destrying a UNIT GROUP, not the unit themselves. You have create the unit group and pick them to then kill them.
Thank you. Ill try it tommorow
Edit:it works. Thank you for your help
 
Last edited:
Status
Not open for further replies.
Top