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

Help With Trigger Respawn

Status
Not open for further replies.
Level 1
Joined
Aug 3, 2008
Messages
3
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)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
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)
 
Level 2
Joined
Aug 6, 2008
Messages
11
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.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
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
 
Level 2
Joined
Aug 6, 2008
Messages
11
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
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
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
 
Level 2
Joined
Aug 6, 2008
Messages
11
In my map it only kills the buildings, not the units that were produced by the buildings.
 
Level 4
Joined
Jul 24, 2008
Messages
108
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
 
Level 2
Joined
Aug 6, 2008
Messages
11
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.
 
Level 2
Joined
Aug 6, 2008
Messages
11
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:
Level 2
Joined
Aug 6, 2008
Messages
11
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.
Top