local my_class = class local my_ship = ships[my_class] local s = sensor_contacts({}) local gotoguy = nil for k, v in pairs(s) do if (v:team() ~= team) then gotoguy = v break end end if gotoguy then printf("gotoguy at: %d, %d\n", gotoguy:position()) end while true do if (gotoguy) then local gx, gy = gotoguy:position() -- JS: Should this recompute? drive_towards(10, gx, gy) debug_diamond(gx, gy, 12) end yield() end