Documentation

Pixel monitors

What a pixel monitor does#

A pixel monitor keeps checking an area of the screen for a colour. Its result is true or false. It can write that result to a Boolean variable, and start or stop routines when the result changes. Use it for things like "the health bar is no longer green" or "a prompt appeared".

Setting one up#

On the Pixel Monitors tab, click New, then:

  • Position and Size: the area to watch. Use Pick point + color (one pixel and its colour), Pick area (drag a box) or Eyedropper (colour only).
  • Color and Tolerance: 0 = exact. 30 allows each of red, green and blue to differ by up to 30.
  • Result is true when: Present (the colour is found) or Absent (the colour is missing).
  • Pixels needed: how many pixels in the area must match before the colour counts as found.
  • Check every (ms): how often it looks.
  • Must hold for (ms): ignores flicker; a change only counts after it lasts this long. 0 = react at once.
  • Write to variable: optional Boolean variable.
Settings for a pixel monitor that watches a green health bar.
Settings for a pixel monitor that watches a green health bar.

Click Save changes to keep your edits. Test now checks the screen once with the current settings without changing any variable. Duplicate copies the monitor.

The saved monitor in the list: true when the green is missing, writes LowHealth, and starts HealWatcher.
The saved monitor in the list: true when the green is missing, writes LowHealth, and starts HealWatcher.

If true and If false actions#

Each monitor has an If true list and an If false list of actions: Start routine or Stop routine. Choose an action and a routine, then click Add.

Each list runs from top to bottom when the result changes to true or to false, and once when the monitor is turned on. Start routine leaves a routine that is already running alone.

If true starts the HealWatcher routine. If false has no actions yet.
If true starts the HealWatcher routine. If false has no actions yet.

Turning it on#

Monitors run only when turned on, using the Pixel Monitor On/Off command in a routine, or a hotkey (see Hotkeys). Stop all and the stop-everything keys turn every monitor off.