• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Harvest Nearby Lumber

Status
Not open for further replies.
Level 6
Joined
Jan 16, 2013
Messages
68
When I order a unit to harvest nearby lumber, if it's too far from the nearest tree it just sits there doing nothing. At least that's how it seems to me.
So, is there any way to increase the 'sight range' for harvesting lumber? I know that it's possible by looping though every tree's distance and comparing them through triggers, but in my map there are plenty of harvesters and I'm afraid it might cause a lot of lag that way.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
A fail safe would be a staggered worker idle detection. If you detect an idle worker you then look for a nearby tree. This process can also be staggered to avoid lag. If the systems are separated you can have the idle worker detection add workers to a tree finder which will order all of them to trees when any are found.
 
Status
Not open for further replies.
Top