Lumber attack harverst

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 71
Joined
Aug 10, 2018
Messages
7,624
Create a channeling ability that targets Trees. Then using one of the many options for creating MUI triggers/spells, trigger the effects of the ability.

Unit Indexing comes to mind here as the easiest GUI method for tracking the Troll/Tree and managing the periodic nature of the ability.

Every 1 second -> Pick every unit in TrollChannelGroup -> Set CV = Custom value of (Picked unit) -> Set life of Tree[CV] = Life of Tree[CV} - 2, Add 2 Lumber to (Owner of (picked unit))

Units that begin channeling the ability are added to TrollChannelGroup (unit group) and units that stop casting the ability are removed from the group. You can enable the periodic trigger once the first unit is added to the group and disable it once the group is empty.

Tree[] is a Destructible variable array that you Set when you cast the ability:
  • Set Variable CV = Custom value of (Casting unit)
  • Set Variable Tree[CV] = Target destructible of ability being cast
 
Last edited:
Status
Not open for further replies.
Top