• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Requesting an automatic gold pickup Trigger

Status
Not open for further replies.
Level 10
Joined
Jul 5, 2012
Messages
230
Hello, to make it short I'm in need of an automatic gold pickup Trigger.
The one we were using seems to be really troublesome and causing to crash the map after a certain playing time.

The goldpile is dropped by defeated enemies, getting in range of them is the only requirement for the autopick so that you don't have to klick on each pile.
(Similar like in Diablo).

I'ld prefer a GUI Trigger but I guess a not to complex Jass Trigger would do the job, too. I highly appreciate any help.
The ones that are online here seem to be kind of undone and leaking.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
AutoPickUp

Your map needs any UnitIndexer to use this system
It's vJass, but the API is really easy.
call StartAutoPickUp(WhichUnit, WhichRange)
call StopAutoPickUp(WhichUnit)

There is a filter called FilterItems, in which you can define what type of items are considered by the system.
(GetWidgetLife(i) > 0.405) <-- This condition is mandatory or the system will malfunction.
 
Status
Not open for further replies.
Top