CreateNUnitsAtLoc

Parameters
countinteger
unitIdinteger
whichPlayerplayer
loclocation
facereal
comment
patch

1.00

Source
Blizzard.j (raise an issue to discuss on Github or submit a PR)
return type
group
Source code
function CreateNUnitsAtLoc takes integer count, integer unitId, player whichPlayer, location loc, real face returns group
    call GroupClear(bj_lastCreatedGroup)
    loop
        set count = count - 1
        exitwhen count < 0
        call CreateUnitAtLocSaveLast(whichPlayer, unitId, loc, face)
        call GroupAddUnit(bj_lastCreatedGroup, bj_lastCreatedUnit)
    endloop
    return bj_lastCreatedGroup
endfunction