JASS Help

GroupRemoveGroupEx

native GroupRemoveGroupEx 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]]] local unit u = CreateUnit(Player(0), '[[[uloc|aloc.html]]]', 0, 0, 0) // Не игнорирует [[[aloc|aloc.html]]] call GroupRemoveGroupEx([[[null|null.html]]], [[[null|null.html]]]) // Безопасна при работе с [[[null|null.html]]] call GroupAddUnit(destGroup, u) call GroupAddUnit(sourceGroup, u) call ConsolePrint([[[I2S|i2s.html]]]([[[GroupGetCount|groupgetcount.html]]](destGroup))) // 1 call ConsolePrint([[[I2S|i2s.html]]](GroupRemoveGroupEx(destGroup, sourceGroup))) // 1 call ConsolePrint([[[I2S|i2s.html]]](GroupRemoveGroupEx(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