polo2005
Wana start playing LoL? http://tinyurl.com/369as27
- Reaction score
- 97
Code:
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Hashtable - Save (Load 0 of (Player number of mCS_Player[(Integer A)]) from mCS_SetupCombat_Temp_Hashtable) as (Integer A) of (Custom value of Location_unit) in mCS_Zone_hashtable[0]
Set temp_point[1] = (temp_point[0] offset by 300.00 towards (90.00 + (180.00 x (-1.00 + (Real((Integer A)))))) degrees)
Set temp_point[2] = (temp_point[1] offset by ((100.00 x (3.00 + (Real((Integer A))))) / 2.00) towards 0.00 degrees)
For each (Integer B) from 1 to (Load (Integer A) of (Custom value of Location_unit) from mCS_Zone_hashtable[0]), do (Actions)
Loop - Actions
Set temp_unit[0] = (Load (Integer B) of (Player number of mCS_Player[(Integer A)]) in mCS_SetupCombat_Temp_Hashtable)
Hashtable - Save Handle Oftemp_unit[0] as (Integer B) of (Custom value of Location_unit) in mCS_Zone_hashtable[(Integer A)]
Set temp_point[3] = (temp_point[2] offset by (100.00 x (Real((Integer B)))) towards 180.00 degrees)
Unit - Move temp_unit[0] instantly to temp_point[3]
Custom script: call SaveReal(udg_mCS_Zone_Points_X_hashtable[GetForLoopIndexA()],GetForLoopIndexB(),GetUnitUserData(udg_Location_unit), GetLocationX(udg_temp_point[3]))
Custom script: call SaveReal(udg_mCS_Zone_Points_Y_hashtable[GetForLoopIndexA()],GetForLoopIndexB(),GetUnitUserData(udg_Location_unit), GetLocationY(udg_temp_point[3]))
Custom script: call RemoveLocation(udg_temp_point[3])
Custom script: call RemoveLocation(udg_temp_point[1])
Custom script: call RemoveLocation(udg_temp_point[2])
Code:
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
For each (Integer B) from 1 to (Load (Integer A) of (Custom value of Location_unit) from mCS_Zone_hashtable[0]), do (Actions)
Loop - Actions
Set unit[0] = (Load (Integer B) of (Custom value of Location_unit) in mCS_Zone_hashtable[(Integer A)])
Set mCS_Reals[0] = (Load (Integer B) of (Custom value of Location_unit) from mCS_Zone_Points_X_hashtable[(Integer A)])
Set mCS_Reals[1] = (Load (Integer B) of (Custom value of Location_unit) from mCS_Zone_Points_Y_hashtable[(Integer A)])
Custom script: set udg_p[0] = Location(udg_mCS_Reals[0],udg_mCS_Reals[1])
Unit - Create 1 Footman for Player 1 (Red) at p[0] facing Default building facing degrees
Cinematic - Ping minimap for (All players) at p[0] for 5.00 seconds
Unit - Kill unit[0]
Custom script: call RemoveLocation(udg_p[0])
This is my 2 triggers, the second one is for testing purpos only, however i'm encounting a problem...
of some reason its the x and y location is only saved for 2 out of 6 units that i'm using, anyone that can point out the error?
note about the trigger:
all hashtables are preset
Location_unit's custome value = 1
For each (Integer B) from 1 to (Load (Integer A) of (Custom value of Loc... it will loop 3 times x 2(integerA loop)
What happens:
All 6 test units are killed correctly, so the unit storage works perfect, BUT there is only created a unit on the first loopB unit, and the 2 and 3 is creaded in 2 gropus(depending on what loopA that is currently running) in the middle of the map,
My question is why doesn't the hashtable store the unit 2-3 x and y real?