Hashtables

Wummi

Just Relax and Smile!
Reaction score
58
Is there a hashtable tutorial in the repository? I can't seem to find one.

So if there is, can someone give me the link please? Thanks.
If not, can someone tell me what a hashtable is, and what it's used for and why does a spell like knockback need a hashtable?
 

Bogrim

y hello thar
Reaction score
154
A hashtable is a way to store data by catalog. Much like you have folders on your computer, a hashtable allows you to create a system for data retrieval. Hashtables access these "folders" through keys (integer values or strings).

Think of the Hashtable as your computer.
"of 0" is the primary folder.
"as 0" is the folder inside the first folder.

Trigger:
  • Hashtable
    • Of 0
      • As 0

An example of values a hashtable might store:
Trigger:
  • Hashtable
    • Of (Key: Unit ID)
      • As Integer Value Damage
      • As Integer Value Duration
    • Of (Key: Unit ID)
      • As Integer Value Damage
      • As Integer Value Duration

You could do something similar with variables alone, only hashtables allow you to store much more data with much more flexible access.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top