• 🏆 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!

simple function

Status
Not open for further replies.
Level 3
Joined
Apr 4, 2012
Messages
64
hey can u guys help me out?

i wanted a certain function like this:

Events-unit dies

Conditions-triggered unit = to Hero Shop building

Actions -If Hero shop building of owned player die's Kill Hero shop unit of trigged player

i have 2 hero shops 1 is a unit other is a building i want if a player hero shop building dies auto kill hero shop unit of owned player.
 
Last edited:
Level 6
Joined
Mar 22, 2009
Messages
276
  • heart left at the building
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to YOURSHOP_BUILDING
    • Actions
      • Set tmp_group = (Units owned by (Owner of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to YOURSHOP_UNIT))
      • Unit Group - Pick every unit in tmp_group and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_tmp_group)
 

Attachments

  • chained lives.w3x
    8.8 KB · Views: 52
Last edited:
Level 3
Joined
Apr 4, 2012
Messages
64
  • heart left at the building
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to YOURSHOP_BUILDING
    • Actions
      • Set tmp_group = (Units owned by (Owner of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to YOURSHOP_UNIT))
      • Unit Group - Pick every unit in tmp_group and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_tmp_group)


Thank you xD
 
Status
Not open for further replies.
Top