Lumber
Events
Destructible - A destructible within (Playable map area) dies
Conditions
Or - Any (Conditions) are true
Conditions
(Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
(Destructible-type of (Dying destructible)) Equal to Ashenvale Tree Wall
Actions
Player - Add 1 to (Owner of (Killing unit)) Current lumber
Lumber
Events
Unit - A unit within (Playable map area) dies
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Tree
Actions
Player - Add 1 to (Owner of (Killing unit)) Current lumber
You could always make an un-selectable building with a tree model, 10hp, and 0 armor, and use the above trigger, changed to:
Code:Lumber Events Unit - A unit within (Playable map area) dies Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Dying destructible)) Equal to Tree Actions Player - Add 1 to (Owner of (Killing unit)) Current lumber
If I am correct in my reasoning that should work as you intend it to.
A destructible within (Playable Map Area) doesn't work right, you HAVE to use a ton of Destructible Dies
BUT! There is a trick to make that quickly:
Make another trigger with event Elapsed game time is 0.1 seconds
and that adds the event to the actual trigger
Trigger:
- LumberAddEvent
- Events
- Time - Elapsed game time is 0.10 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 Summer Tree Wall
- (Add Other trees you use here)
- (Note: You NEED a condition here, because trees aren't the only type of destructibles... Rock Chunks, for example, are destructibles)
- Then - Actions
- Trigger - Add to LumberAddEvent <gen> the event (Destructible - (Picked destructible) dies)
- Else - Actions
----
Not really... I mean, yes he could do that, but your trigger has a problem: you use Unit-Type of Dying destructible...
You can't convert a destructible to unit type XD
More like Unit-Type of Dying Unit