Browse docsDocumentation home
On this page
Documentation

Atlas documentation

Set up Atlas for Windows, connect your capture card, controller or console, and write scripts that react to what Atlas sees.

Set up and use Atlas

Atlas Script

Atlas Script connects what Atlas sees to what your controller does. Start with the overview to learn how a script runs, then use the reference whenever you need the details of an event, object, or method.

Your first script

This script watches for a colored marker in the video and holds Cross while the marker is visible. Video work happens in on_frame; controller changes happen in on_input.

marker-button.atlas
color markerColor = vision.color([0, 90, 80], [15, 255, 255]);
bool markerVisible = false;

event on_frame() {
    markerVisible = markerColor.target != null;
}

event on_input() {
    if (markerVisible) {
        output.set_button("cross", true);
    }
}

event on_stop() {
    ui.clear();
}
Why two events? Video frames and controller packets arrive independently. on_frame updates what the script has seen, and on_input applies it to the controller. When no marker is visible, the script leaves Cross alone, so the physical button still works.

Read how a script runs