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

Tree Problem

Status
Not open for further replies.
Level 5
Joined
Jul 12, 2007
Messages
113
Could anyone pls tell me how to prevent Death and Decay from destroying trees? i set the damage to 0 and even set none targets, but the trees are destroyed. Please help!!
(I don't want to make all trees invulnerable because it's a melee map and i need the trees)
 
Level 8
Joined
Feb 20, 2007
Messages
338
Could anyone pls tell me how to prevent Death and Decay from destroying trees? i set the damage to 0 and even set none targets, but the trees are destroyed. Please help!!
(I don't want to make all trees invulnerable because it's a melee map and i need the trees)

Either assign trees with an utterly ridiculously large hit point value (like 99999 (hold down shift when clicking on the object editor line).

OR

You can make a tree regrowth trigger set. It takes two a tree picker and an added trigger which is added to tree picker.

I will include and example of that here:

  • Tree Picker
    • Events
      • Time - Elapsed game time is (0.01 + 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
              • Custom script: set bj_wantDestroyGroup = true
              • Trigger - Add to Tree Regrowth <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Ashenvale Canopy Tree
            • Then - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Trigger - Add to Tree Regrowth <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Dark Forest Giant Tree wall
            • Then - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Trigger - Add to Tree Regrowth <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Dark Forest Giant Tree
            • Then - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Trigger - Add to Tree Regrowth <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
              • Do nothing
The trigger that must go with this:

  • Tree Regrowth
    • Events
    • Conditions
    • Actions
      • Wait 65.00 seconds
      • Destructible - Resurrect (Dying destructible) with (Max life of (Picked destructible)) life and Show birth animation
Now why do we have these triggers like this:

1. Why do we have to pick all the destructible? Because the event "a Destructible dies) only selected or picks from the first 64 destructible in a region in this case the whole map.

2Why do I have so many if/then/else conditions - Because you have to carefully pick out those destructibles you want to regrow. Gates, barrels and crates and a few other things would grow back if you did not choose what you want to come back. I think OR would work. Never tried it.

The second is added to the trigger. No other way in GUI to do this. Jass is much more flexible and you can compress into one trigger (I think).

Regrowing trees this way will result in a tree "growing" out of the grown after the time is up. the tree will not grow if a unit building is placed on the spot.
 
Level 5
Joined
Jul 12, 2007
Messages
113
@Just_Spectating: As i said, that doesnt work.

@All: Thanks for help, but i found an other way to create my spell, i just took "Silence" as basic spell. The reason i wanted to use Death and Decay was the Animation i created with it. But a freind of mine helped me and created the animation per trigger. But thank u all very much for help.
 
Status
Not open for further replies.
Top