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

Unit Indexers questios :S

Status
Not open for further replies.
Level 6
Joined
Jul 26, 2010
Messages
167
Duo to they are confusing I got to ask some stuff....

1. They replace the hashes? (I mean a way to use the same trigger for different units at the same time)

2. HOW THE HELL I USE THEM? (They are filled with lots of code a vars and that confuse me)

3. Whats the best one I can use?

4. if I've created hashables to use my triggered spells or give diferent orders for my units at the same time, I need to erase them to apply the indexer on them?

5(optional xD). If ure very kind, could you pls upload a map that makes two units move to diferent ways continuosly with the indexer?
 
1) not sure what u mean by replace the hashes ? unless u mean how to use them in the hashtable. u need to use there custom value instead of there Key when saving to a hashtable.

2)the GUI one by bribe uses there custom value. so to use it in an array or hashtable u use there custom value.

3) the best for GUI is the one Bribe made ( i believe)

4) umm not really sure what u mean. if u have old hashtables tho u will have to edit them all to use the indexer but if they are working already and u use key of the unit then u dont need to do this.

5) sry i never use the unit indexer i always index my spells manually.

in my tutorial there is a chapter that can help u with indexing. it is more efficient than hashtables and IMO easier to do.

http://www.hiveworkshop.com/forums/tutorial-submission-283/things-gui-user-should-know-233242/
 
Indexers accomplish three things

#1: They can detect whenever a unit is made
#2: They can detect whenever a unit is removed or decays
#3: They assign each unit an index between 1 and 8191. Those ids can be used in arrays, so no hashtables required. They make use of unit user data, so they are faster than GetHandleId too.

The best one for GUI atm is Bribe's I believe. The best one for vJASS is mine.
 
Status
Not open for further replies.
Top