- Joined
- Feb 23, 2007
- Messages
- 1,030
I have a loop with an array, and I'm wondering if I need to null the values at the end of each loop or just at the end of the function.
Don't worry about whether it's fast or not lol I know what I'm doing
JASS:
loop
exitwhen a>speed
loop
exitwhen b>speed
set q = GetHandleUnit(z,"c"+I2S(a)+"r"+I2S(b))
set xtraU = GetHandleUnit(z,"c"+I2S(a+1)+"r"+I2S(b))
set xtraB[1] = GetHandleBoolean(xtraU[1],"o")
set xtraU = GetHandleUnit(z,"c"+I2S(a)+"r"+I2S(b+1))
set xtraB[2] = GetHandleBoolean(xtraU[2],"o")
set xtraU = GetHandleUnit(z,"c"+I2S(a+1)+"r"+I2S(b+1))
set xtraB[3] = GetHandleBoolean(xtraU[3],"o")
set xtraB[4] = GetHandleBoolean(q,"o")
if xtraB[1] == true and xtraB[2] == true and xtraB[3] == true and xtraB[4] == true then
call SetUnitOwner(q, tp, true)
endif
set b = b+1
endloop
set b = speed*-1
set a = a+1
endloop
Don't worry about whether it's fast or not lol I know what I'm doing