Hi, I'm a newbie. Sorry for my mistakes. Ok, so, my map has 110 trees and requires players to protect the trees from being chopped down by the enemy units. If the number of trees reaches 0, then the players will be defeated. But I'm having problem tracking the number of trees in my map. I tried 2 triggers :
*Note : The amount of lumber indicates the number of trees alive*

*P.S - The number of trees are counted correctly (110). It is also shown in the object manager (F11)*
*Note : The amount of lumber indicates the number of trees alive*
-
Decrease Lumber
-
Events
-
Destructible - A destructible within (Playable Map Area) dies
-
-
Conditions
-
(Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
-
-
Actions
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Player - Set (Player((Integer A))) Current lumber to (((Player((Integer A))) Current lumber) - 1)
-
-
-
-
-
Decrease Lumber
-
Events
-
Time - Every 5.00 seconds of game time
-
-
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
-
Set CountHarvest = (CountHarvest + 1)
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Player - Set (Player((Integer A))) Current lumber to CountHarvest
-
-
-
-
-
-
-
-

*P.S - The number of trees are counted correctly (110). It is also shown in the object manager (F11)*