JASS Help

GroupAddGroupEx

native GroupAddGroupEx takes [[[group|group.html]]] destGroup, [[[group|group.html]]] sourceGroup returns [[[integer|integer.html]]]

Добавляет юнитов из группы sourceGroup в destGroup. Возвращает количество добавленных юнитов.

globals group destGroup = [[[CreateGroup|creategroup.html]]]() group sourceGroup = [[[CreateGroup|creategroup.html]]]() endglobals function gameStart takes [[[nothing|nothing.html]]] returns [[[nothing|nothing.html]]] call GroupAddGroupEx([[[null|null.html]]], [[[null|null.html]]]) // Безопасна при работе с [[[null|null.html]]] call GroupAddUnit(sourceGroup, CreateUnit(Player(0), '[[[uloc|aloc.html]]]', 0, 0, 0)) // Не игнорирует [[[aloc|aloc.html]]] call ConsolePrint([[[I2S|i2s.html]]]([[[GroupGetCount|groupgetcount.html]]](destGroup))) // 0 call ConsolePrint([[[I2S|i2s.html]]](GroupAddGroupEx(destGroup, sourceGroup))) // 1 call ConsolePrint([[[I2S|i2s.html]]](GroupAddGroupEx(destGroup, sourceGroup))) // 0 call ConsolePrint([[[I2S|i2s.html]]]([[[GroupGetCount|groupgetcount.html]]](destGroup))) // 1 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