Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,219
hello. I just came across an idea concerning hashtables.
Generally you use a unit's handle id as one key and then a number as the other key.
Then I thought of the following, if I could replace the 2d array with an 1d array that would be really good.
Generally you use a unit's handle id as one key and then a number as the other key.
Then I thought of the following, if I could replace the 2d array with an 1d array that would be really good.
-
Melee Initialization
-
Events
- Map initialization
- Conditions
-
Actions
- Hashtable - Create a hashtable
- Set my_hashtable = (Last created hashtable)
- -------- ----------------- --------
- Set some_real = 55.00
- Set some_unit = Mountain King 0000 <gen>
- -------- ----------------- --------
- Hashtable - Save some_real as (Key (Triggering unit)) of 1 in my_hashtable
- Hashtable - Save Handle Ofsome_unit as (Key (Triggering unit)) of 2 in my_hashtable
-
Events
-
Actions
- Custom script: set udg_id = GetHandleId(somehandle)
- Set random_integer[id] = 77
- Set random_real[id] = 5656.00