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!
Unit - Order (Entering Unit) to right-click (Picked Item)
That works as long as there is only one item in the region. More than one item and the unit won't pick it up.
But i don't know if there is a better solution...
You use simple maths to get the distance of the item away from the unit. If it exceeds your circle's radius then it is not in the range you want it to be. Thus you basically ignore all items via an if statment that have a distance greater than the circle's radius as it loops though each item.
The maths you need to know is Pythagoras' theorem as WC3 uses an X and Y grid and thus forms a right angled tri-angle between the points.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.