- Joined
- Nov 30, 2007
- Messages
- 1,202
Can someone please teach me how to use hashtables? I try getting it from tutorials but it just wont come through :<
Currently I have a setup like this:
But to get these later I have to loop through all of the say 150 gates each time someone cast a spell ON them, so how would I set this up differntly?
How do I store them in HASH, and how do I get which gate is being targeted without looping trough 150 gates?
Currently I have a setup like this:
JASS:
set x[i] = GetRectCenterX(gg_rct_House_GC_00)
set y[i] = GetRectCenterY(gg_rct_House_GC_00)
set gateT[i] = 'LTe2'
set gateSize[i] = 0.8
set gateFace[i] = 0
set gateLock[i] = TRUE
set i = i + 1
set x[i] = GetRectCenterX(gg_rct_House_GC_01)
set y[i] = GetRectCenterY(gg_rct_House_GC_01)
set gateT[i] = 'LTe2'
set gateSize[i] = 0.8
set gateFace[i] = 180
set gateLock[i] = TRUE
set i = i + 1
// e.t.c. ...
But to get these later I have to loop through all of the say 150 gates each time someone cast a spell ON them, so how would I set this up differntly?
How do I store them in HASH, and how do I get which gate is being targeted without looping trough 150 gates?
Last edited: