Fandom

Petit Computer Wiki

TCHX, TCHY, TCHST, and TCHTIME (System Variable)

915pages on
this wiki
Add New Page
Comments0 Share

Together, the system variables TCHX, TCHY, TCHST and TCHTIME (all read-only integers) indicate activity on the touchscreen.

When the stylus is detected on the touchscreen, TCHX and TCHY are set to the location of the touch, TCHST is set to 1, and TCHTIME starts counting. As long as the stylus stays in contact with the screen, TCHX and TCHY will follow the contact point and TCHTIME will keep increasing. As soon as the stylus is removed, TCHST is set to 0, and TCHTIME is set to 0 and will stop. TCHX and TCHY will retain their last values, so even when the stylus is up, you can read the last location it was detected.

TCHX appears to have a range of 0 to 255 inclusive, and TCHY appears to have a range of 0 to 191 inclusive. TCHTIME appears to use frames as the unit of time.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.