Grouping Last Created Unit

Status
Not open for further replies.

bnu

bnu

Level 2
Joined
Apr 6, 2012
Messages
17
hello hiver :ogre_hurrhurr:

i want to ask a trigger, the trigger use for grouping unit. After the unit Created in a region, then the Created unit on the region is one group

sorry for my bad english :vw_sad: my grammar is very suck :ogre_rage:

thanks :ogre_haosis:
 
So the whole actions are
[Trigger=Actions]Copy these actions
Unit - Create 10 Footman for Player 1 (Red) at (Center of (Your Region)) facing Default building facing degrees
Set Unit_Group = (Last created units)[/Trigger]
Variable name : Unit_Group
Vaiable type : Unit Group
 
So the whole actions are
[Trigger=Actions]Copy these actions
Unit - Create 10 Footman for Player 1 (Red) at (Center of (Your Region)) facing Default building facing degrees
Set Unit_Group = (Last created units)[/Trigger]
Variable name : Unit_Group
Vaiable type : Unit Group

maybe Last Created Units group?

and how to default the unit Formation. i'll make the Unit on the group always together, not too fast not too slow and not too far from every other Unit?
 
maybe Last Created Units group?

and how to default the unit Formation. i'll make the Unit on the group always together, not too fast not too slow and not too far from every other Unit?

it actually add them to
JASS:
bj_lastCreatedGroup

heres the full thing for creating units
JASS:
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
 
Status
Not open for further replies.
Back
Top