• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Big problem .HELP ME !!!

Status
Not open for further replies.
Level 3
Joined
Jun 21, 2008
Messages
38
Hi.i have a question . . Im making a map like Vampirism .and i dont know how to make when your worker is killed how destroy all base . . .?
PLEASE HELP
 
  • Blah
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to <Unit-Type>
    • Actions
      • Set Group = (Units owned by (Owner of (Triggering unit)))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_Group)
 
What you'd need is a trigger which is activated upon your units death, I'D go for "Specific unit event" if you want to refer to a unit inside a variable, you either have to add the event from another trigger were you set the variable, or go with a "Generic Unit Event" and then check through conditions to make sure it only runs the actions when the conditions are met.

For your action, it's quite simple.
Your want to refer to all the units and buildings that a player owns, and then destroy them.

so we look up the action.
Code:
Unit Group - Pick Every Unit in a Unit Group and Do Multiple actions.

we want to select all the units from the player which lost his/her unit, so:
  • Unit Group - Pick every unit in (Units in (Entire map) owned by (Owner of (Dying unit)))
now you'll see there is a loop under the actions, you can fill in your action to kill the units you picked so:
  • Unit - Kill (Picked unit)
Your done!
The trigger looks like this

  • "your trigger name"
    • Events
      • Unit - "your unit" Dies
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map) owned by (Owner of (Dying unit))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
Leak free version:
  • "your trigger name"
    • Events
      • Unit - "your unit" Dies
    • Conditions
    • Actions
      • Set tempgroup = (Units in (Entire map) owned by (Owner of (Dying unit)))
      • Unit Group - Pick every unit in tempgroup and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_tempgroup)
 
Thanks you very much .
Btw can someone help me with the map ?
I have some isues ,i forgot many things about trigers. . . I have not played Warcraft for about 1 year .
 
Allyourbaseareblongtous!
I mean, triggers should not take long at all to relearn. I did not use python for over 2 years and in a mater of weaks I was already able to use it better than before.

You may wish to skip GUI and move straight to JASS as GUI is really more trouble than it is worth.

Depending on the complexity of triggers you need, I am sure people will be able to help.
 
Status
Not open for further replies.
Back
Top