cleeezzz
The Undead Ranger.
- Reaction score
- 268
JASS:
set Hero[GetPlayerId(p)] = GroupPickRandomUnit(g)
set Hero[GetPlayerId(p)] = GroupPickRandomUnit(g)
set g = NewGroup()
call GroupEnumUnitsInRect( g, bj_mapInitialPlayableArea, Condition(function PrivateFilter))
set c = CountUnitsInGroup(g)
loop
exitwhen i == c
set RandomHero<i> = FirstOfGroup(g)
call GroupRemoveUnit(g,RandomHero<i>)
set i = i + 1
endloop</i></i>
set g = NewGroup()
call GroupEnumUnitsInRect( g, bj_mapInitialPlayableArea, Condition(function PrivateFilter))
set c = CountUnitsInGroup(g)
loop
exitwhen i == c + 1
set RandomHero<i> = FirstOfGroup(g)
call BJDebugMsg(I2S(i))
call BJDebugMsg(GetUnitName(RandomHero<i>))
call GroupRemoveUnit(g,RandomHero<i>)
set i = i + 1
endloop
call ReleaseGroup(g)
set r = GetRandomInt(1,c)
call BJDebugMsg(I2S(r))
set Hero[GetPlayerId(p)] = RandomHero[r]</i></i></i>