Code: Select all
local function expire()
-- teamID = ???
while true do
if Spring.GetTeamResources(teamID, "energy") < 10 then
Spring.DestroyUnit(unitID)
end
Sleep(1750)
end
endAlso: is there a separate GetPlayerResources? I couldn't find one on the wiki. Or will GetTeamResources work fine here, even if the player's allied to someone with plenty of energy?
