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

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