- Joined
- Aug 6, 2009
- Messages
- 697
-
Actions
-

Custom script: local boolean InGroup
-

Custom script: local integer UnitType2
-

Custom script: local integer i = 0
-

Custom script: local boolean done
-

Custom script: set done = false
-

Custom script: set UnitType2 = 0
-

Custom script: set InGroup = true
-

Custom script: loop
-

Custom script: set UnitType2 = GetUnitTypeId(udg_DR_Units[i])
-

Custom script: set InGroup = IsUnitInGroup(udg_DR_Units[i], udg_DR_InUse)
-

Custom script: if udg_DR_UnitType == UnitType2 and InGroup == false then
-

Custom script: set udg_DR_Number = i
-

Unit Group - Add DR_Units[DR_Number] to DR_InUse
-

Unit Group - Remove DR_Units[DR_Number] from DR_NotInUse
-

Unit - Unhide DR_Units[DR_Number]
-

Unit - Change ownership of DR_Units[DR_Number] to DR_Player and Change color
-

Custom script: call SetUnitXY(udg_DR_Point,udg_DR_Units[i])
-

Custom script: set done = true
-

Custom script: elseif i == udg_DR_MaxIndex then
-

Custom script: set udg_DR_MaxIndex = udg_DR_MaxIndex + 1
-

Custom script: set udg_DR_Number = udg_DR_MaxIndex
-

Custom script: call CreateUnitAtLoc(udg_DR_Player, udg_DR_UnitType, udg_DR_Point, udg_DR_Angle)
-

Custom script: set udg_DR_Units[udg_DR_Number] = GetLastCreatedUnit() <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<HERE
-

Unit Group - Add DR_Units[DR_Number] to DR_InUse
-

Custom script: set done = true
-

Custom script: endif
-

Game - Display to (All players) the text: (String(DR_Number))
-

Game - Display to (All players) the text: (String(DR_UnitType))
-

Game - Display to (All players) the text: (Name of DR_Units[DR_Number])
-

Custom script: set i = i + 1
-

Custom script: exitwhen done == true
-

Custom script: endloop
-






