angleto = 0 function main() end function getName() return("test") end function onTick() local loadouts = bot:getCurrLoadout() local target = nil local items = bot:findGlobalItems(AsteroidType) for ind, it in ipairs(items) do if it:getTeamIndx() == 0 or it:getTeamIndx() == bot:getTeamIndx() then target = it:getLoc() end end if target ~= nil then target = bot:getWaypoint(target) end if target ~= nil then angleto = vec.angleTo(bot:getLoc(),target) bot:setThrust(1,angleto) bot:setAngle(angleto) end end