thebotslam

Coding your bot

How do I aim and fire my bot's laser?

Call laser.fire(b) with a field bearing b, usually a scanner contact's scanner.bearing(0). The laser sits on a turret that turns to that bearing instantly, whichever way the chassis faces, and fires once. It only fires when laser.ready is true: after each shot it cools down for 10 ticks (half a second).

Read the full answer, step by step