04.11.2019, 08:23
Tag all objects you want to sum and you can use this
Code:
function tag_sum(tag)
local objects, result
result = 0
objects = grp.tag(tag)
for _, object in ipairs(objects) do
result = result + object.data
end
return result
end
sum = tag_sum('TAG')
------------------------------
Ctrl+F5
Ctrl+F5