• 🏆 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!

Need Help w/ Auto Item Pickup

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi.

I am making a hack n slash, simple to the bone arena. In it, I want units to not click on items on the ground in order to acquire them, just to be near them. That being said, I have:

-9 regions
-7 items
-each region spawns a different item (or example, 2-3 regions spawn same kind of item)

I am having issues figuring out:

1. trigger-wise, don't have ideas on checking the range between the unit and the item there.

2. trigger-wise, don't have ideas on checking if the unit already has the same item so he can't pick it up

3. i have one inventory slot allowed, to deny players more than one item being used at a time. and with this, I need the item to be dropped, removed first before the new one picked up.

---------------------------

Please post in GUI-like triggers only. I don't fully understand jass. Thank you
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The size of the region affects the auto pickup range. Note that if you drop an item, it can be automatically picked up again. There are ways to prevent that if needed. Add all heroes to the hero group at map initialization or when they are created. You can decrease the loop time to make the triger check the items more often, but don't make it too low like under 0.1 seconds.

Item auto pickup
 
Status
Not open for further replies.
Top