• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Kill em

Status
Not open for further replies.
Level 21
Joined
Jul 6, 2014
Messages
6,791
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,791
  • 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