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

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