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

Nearby Trees Increase Speed %

Status
Not open for further replies.
You need a unit group for this. (never remove it) don't use it for anything else either.
A trigger for when unit gains ability lvl.
A trigger that loops every 0.03
Unit indexer by bribe.
A Boolean array.

When unit gains an ability lvl check if it has the ability and add that unit to the unit group.
In the loop trigger check if the unit has the ability ( in case it can lose the ability).
Then if it has the ability check if the unit is near a tree.
If it is near a tree then check the boolean in another ITE.
If it is near the tree and boolean is false then you can use the action unit change movement speed or whatever it is. Then set the boolean to true. (this is for telling if the units speed is increased.
In the Else block if the boolean is true and not near a tree then change the units movement sped back to what it should be.

You may need a system to check when the units speed changes in case other spells or items increase its movement speed.
 
Status
Not open for further replies.
Top