function pack(...)
return arg
end
types = pack(GetObjectCreaturesTypes('garrisonName'))
army = {}
for n, id in types do
if id > 0 then
army[length(army)+1] = {id, GetObjectCreatures(id)}
end
end
-->>>army == {{id, number}, {id, number}, etc.}You can use any algorithm you like for working with the parameters; this is just an example. GetObjectCreaturesTypes returns the types (IDs) of creatures (and zero if it's not a complete set), and GetObjectCreatures(id) retrieves the number of creatures in the object for a given ID.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________