• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger action for this. (destroying all of a players' units on <unit> death)

Status
Not open for further replies.
Level 10
Joined
Jul 22, 2008
Messages
363
In my map there is a main builder unit and if he dies then all of your units die.
Although I don't have the trigger in front of me it goes something like this.
Event: A Unit Dies
Condition: Unit Type Equal to Razormane Artisan
Action: Ive looked under the units section and I cannot find a trigger that destroys all of the buildings and units owned by the player after this unit dies.
Help is appreciated.:thumbs_up:
 
Pick every unit owned by (owner of "dying" unit)
-If
-picked unit equal to building(structure or something:grin:)
-Act
-Kill picked unit
 
  • Actions
  • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
    • Loop - Actions
      • Unit - Kill (Picked unit)
 
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Razormane Artisan
  • Actions
    • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Owner of (Triggering unit))) and do (Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from (Units in (Playable map area)))
WHy isn't this trigger working? The unit died that I wanted but then the other units that I owned didn't go away. Without this kind of trigger my map is on standstill. Help please
 
Use this:

  • Yay
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
U better give me a cookie for all of this work. xD
 
I just ran out of cookies but I have something better..... thanks I will try this trigger out.
Problem with the trigger
  • Untitled Trigger 006
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Razormane Artisan
    • Actions
      • Custom script: Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
Please tell me what I did wrong.
 
Don´t forget to clean leaks!

  • Custom script: set bj_wantDestroyGroup = true

I dont think that its a good thing to teach leaks to who doesnt even know about unit groups
that may cause confusion
he'll learn things like that later
 
I dont think that its a good thing to teach leaks to who doesnt even know about unit groups
that may cause confusion
he'll learn things like that later

Meh, in my opinion he should be aware what leaks are, and learn how to clean them from the start. It's so piss annoying to fix a whole map of leaks later on.

:( Im not a complete idiot when it comes to World Editor I just forget where things are! :) and I already put the script in so if there were any leaks there gone now.

True that, I have the same thing all the time.
 
err I didnt say that you are idiot
Well when I was knowing same as you are
I wouldnt want to get in complicated things, that would confuse me much
I just... bah whatever
 
Status
Not open for further replies.
Back
Top