Forged Alliance Forever Forged Alliance Forever Forums 2018-04-03T20:44:31+02:00 /feed.php?f=53&t=16070 2018-04-03T20:44:31+02:00 2018-04-03T20:44:31+02:00 /viewtopic.php?t=16070&p=162375#p162375 <![CDATA[Re: How to pick up units of some category in a rectangle?]]> But something like this will do the job

Code:
    local entities = GetUnitsInRect(rect)
    local units
    if entities then
        units = EntityCategoryFilterDown(category, entities)
    end


And if you want to get units only of a specific army, then there's function for that in ScenarioFramework.lua

https://github.com/FAForever/fa/blob/develop/lua/ScenarioFramework.lua#L390-L409

Statistics: Posted by speed2 — 03 Apr 2018, 20:44


]]>
2018-04-03T20:37:42+02:00 2018-04-03T20:37:42+02:00 /viewtopic.php?t=16070&p=162373#p162373 <![CDATA[How to pick up units of some category in a rectangle?]]>
the 'rect' here has been defined , don't worry about it

I am not sure if it is right to use two commands in one sentence?

Statistics: Posted by Ghoustaq — 03 Apr 2018, 20:37


]]>