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

Hashtables

Status
Not open for further replies.
Level 8
Joined
Jun 30, 2010
Messages
259
I undestand the basics of hastables and how they work, but I am now asking for help to store data which is always the same (a constant) such as the custom value for a unit, since I don't know how to do this. I think it has something to do with the multiple vabiable storing:
  • Hastable
    • Actions
      • Hashtable - Save (value) as (value) of (value) in Hashtable
But I am not quite sure, if anyone knows anything about hashtables, a little help with this would be appreciated.
Thanks!
/Laserdude
 
It's the action Hashtable - Save Integer; Custom values are integer numbers.
So, the first (value) is the value you want to save (in your case the "Unit - Custom Value (of a unit)"). The second (value) is how you are going to name it, so that, in the loading part, you have some sort of an "id" for this value. You can name it however you want, I usually use "Hashtable - Get String ID" (strings), not "Handle ID", which requires numbers. For example, we call it "customvalue".
The final (value) is where you want this value to be saved, for example the unit that casts the ability.

So, we have (whichValue), (nameValue), (wheretoValue) and it becomes:
  • Hashtable - Save (Custom value of (Triggering unit)) as Key(customvalue) of (Key(Triggering unit)) in Hash
 
Status
Not open for further replies.
Top