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

Item Spawn at Destructible (Tree) Death

Status
Not open for further replies.
Level 1
Joined
Apr 20, 2011
Messages
2
I am relatively acquainted with triggers and just started getting back into WCIII a few days ago, and I'm kind of stuck on something.


  • Tree Death
    • Events
      • Destructible - A destructible within (Entire map) dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Destructible-type of (Dying destructible)) Equal to Ashenvale Tree Wall) or ((Destructible-type of (Dying destructible)) Equal to Ashenvale Canopy Tree)
        • Then - Actions
          • Item - Create |cff804000Wood|r at ((Position of (Dying destructible)) offset by (0.00, 0.00))
        • Else - Actions
          • Do nothing
I looked at the Destructible Event and it said there's a limit to 64 destructibles within a region to activate the trigger, so that's probably my issue. However, I was wondering if there was an alternative way of doing this rather than creating a bunch of regions or individually selecting trees?
 
Level 4
Joined
Jan 27, 2010
Messages
133
Try manually adding the events:

  • Register Tree Death Event
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
            • Then - Actions
              • Trigger - Add to Tree Death <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
  • Tree Death
    • Events
    • Conditions
    • Actions
      • Item - Create Bundle of Lumber at (Position of (Dying destructible))
Also, you might want to look up some information on point leaks.
 
You can also use this:
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Destructible - Pick every destructible in (Playable Map Area) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Destructible-type of (Dying destructible)) Equal to Ashenvale Tree Wall) or ((Destructible-type of (Dying destructible)) Equal to Ashenvale Canopy Tree)
          • Then - Actions
            • Trigger - Add to Tree Death <gen> the event (Destructible - (Picked destructible) dies)
          • Else - Actions
  • Tree Death
  • Events
  • Conditions
  • Actions
    • Set Point1 = (Position of (Dying destructible))
    • Item - Create |cff804000Wood|r at Point1
    • Custom script: call RemoveLocation (udg_Point1)
Edit: Late by a minute. ;p
 
Status
Not open for further replies.
Top