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

Help With Trigger Respawn

Status
Not open for further replies.

rancorzealot

R

rancorzealot

I have a trigger that respawns a unit at a location but, i want his current buildings he had to die with him. Anyone have any idea?

Events
Unit - A unit Dies
Conditions
[Unit-type of (Triggering unit)) Equal to Farmer

Then i cant figure out where to put the explode structure part...
 
Try this, the problem is that works only for one player(player red)

  • KillEm
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Peasant
    • Actions
      • Set UnitGroupVariable = (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Equal to Player 1 (Red))))
      • Unit Group - Pick every unit in UnitGroupVariable and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_UnitGroupVariable)
 
Fixes of BerZeKeR's trigger:

  • KillEm
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering Unit)) Equal to Farmer
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering Unit)))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
 
I get all the way up to the action that says : matching matching unit is a structure equal to true

I can't figure out how to do the "owner" part.

I can't figure out how to get the "and..." part of that trigger

Sorry I'm still trying to learn this and am very new to map-making.
 
It's Pick every unit in region and do....
Now the region is definded by the conditions, the posters above have set.
So it's pick every unit in *region* matching *condition*.
The conditions are more than 1 so 'and' is used to define a second one.
The first condition is matching unit is a structure equal to true (boolean condition) and the second can be found under player comparison

'and' can be found when you scroll to the very end of the conditions-dropdown menu
 
I got this to work so it automatically kills all buildings, BUT, I want it to also kill all units that were owned by the dying person.

Please help, and thanks for the help so far

Apachu
 
PurplePoot said:
  • KillEm
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering Unit)) Equal to Farmer
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering Unit)))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
This kills ALL units owned by the Owner of the dying unit
 
If you want only buildings after the maching part, do a "and" under conditions and keep that condition but add another one saying unit classification = building
 
HELP PLEASE!!

My map is completly finished with the exception of this one trigger, just to restate what I want:

I need a trigger that when a "player's hero" dies all the buildings he made and all the units that were produced also die/are removed.
 
No I mean where would I add that? Right now it looks like this

Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)

Is this what you mean?

Unit Group - Pick every unit in (Units in (Playable map area) matching (((((Triggering unit) is A structure) Equal to True) and ((Unit-type of (Triggering unit)) Not equal to Farmer)) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)






^ Doesn't work, neither buildings nor Units get killed upon death with this trigger

GRRRRRRRRRRRRRRR :(
 
Last edited by a moderator:
IT WORKED!!!!!!!!!!!

I really can't thank everyone enough, 2 STINKING DAYS i spent on this and it finally works


THNAKS A TON EVERYONE!!
 
Status
Not open for further replies.
Back
Top