GroupAddUnit
native GroupAddUnit takes [[[group|group.html]]] whichGroup, [[[unit|unit.html]]] whichUnit returns [[[nothing|nothing.html]]]
globals
group g = [[[CreateGroup|creategroup.html]]]()
endglobals
function gameStart takes [[[nothing|nothing.html]]] returns [[[nothing|nothing.html]]]
call GroupAddUnit(g, [[[null|null.html]]]) // Безопасна при работе с [[[null|null.html]]]
call GroupAddUnit(g, CreateUnit(Player(0), '[[[uloc|aloc.html]]]', 0, 0, 0)) // Не игнорирует [[[aloc|aloc.html]]]
call GroupAddUnit(g, CreateUnit(Player(0), 'hfoo', 0, 0, 0))
call ConsolePrint([[[I2S|i2s.html]]]([[[GroupGetCount|groupgetcount.html]]](g))) // 2
endfunction
function [[[main|main.html]]] takes [[[nothing|nothing.html]]] returns [[[nothing|nothing.html]]]
call TimerStart(CreateTimer(), 0, false, function gameStart)
endfunction
Last modified: 22 October 2024