• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Damage units around dying destructible

Status
Not open for further replies.
Level 2
Joined
Aug 30, 2007
Messages
23
I am trying to create a trigger to damage units around destructibles that die (Usually by being knocked into them by knockbacks), but it does not seem to be working. For some reason I cannot select any variable other than 'No destructible'. I can easily add destructibles to variables however.
  • Events
  • Destructible - No Destructible dies
  • Conditions
  • (Destructible-type of (Dying Destructible)) Equal to Summer Tree Wall
  • Actions
  • Unit- Create 1 TreeDamage for Neutral Passive at (Position of (Dying Destructible)) facing default building degrees
  • Unit- Cause (Last Created unit) to damage circular area after 0.00 seconds of radius 500 at (Position of Last Created unit)), Dealing 100 damage of attack type normal and damage type normal.
I can easily get the effect I want using 'Destructible within region' but that would force me to make at least 80 regions as it only selects the first 64 destructiblesin the region. I am just wondering if there is a way to check the whole map for dying destructibles at it would make this whole thing a lot eaiser. Any help would be gretly appreciated.

Also, if you are wondering about the high damage and radius, it was for testing, and I plan to have different destructibles do different damage for different radius' (trees 50, rocks 80, explosive crates 200, ect)
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
First create a trigger that you call f.ex. Init then create another trigger and then add this to the Init trigger:
  • Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Trigger - Add to YOUR SECOND TRIGGER the event (Destructible - (Picked destructible) dies)
And then add this to the second trigger:
  • YOUR SECOND TRIGGER
    • Events
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
    • Actions
      • Unit - Create 1 Footman for Neutral Passive at (Position of (Dying destructible)) facing Default building facing degrees
      • Unit - Cause (Last created unit) to damage circular area after 0.00 seconds of radius 500.00 at (Position of (Last created unit)), dealing 100.00 damage of attack type Normal and damage type Normal
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
You do not need to create a dummy caster.
Just use Damage Area(not Unit Damage Area).
 
Status
Not open for further replies.
Top