Statistics: Posted by Zock — 05 Apr 2013, 19:33
UISelectionByCategory("ENGINEER", false, true, true, true) -- select the engineer on screen closest to the mouse
Ui_EXpandCurrentSelection() -- select all the engineers on screen
UI_MakeSelectionSet("temp") -- name this selection
local unitlist = {}
for index, unit in selectionSets["temp"] do -- for every engineer...
if unit:IsIdle() then -- if it is idle....
table.insert(unitlist,unit) -- save it in a new list
end
end
AddSelectionSet("temp", unitlist) -- Renew the selection with this new unit list
ApplySelectionSet("temp") -- Make this the active selection
-- SelectUnits(unitlist) Or should I use this function?
Statistics: Posted by johnie102 — 05 Apr 2013, 19:31