Ask questions about the world: input, collisions, mouse/keyboard state, time, and dates.
// Check whether the sprite is touching another sprite
self.isTouching(self);
// Check whether the sprite is touching a color on the backdrop
self.isTouchingBackdropColor(Color.fromHex("#ff0000"));
// Check whether the sprite is touching the edge of the stage
self.isTouchingEdge();
// Check whether the sprite is touching the mouse pointer
self.isTouchingMouse();
// Get the distance from the sprite to a point
self.distanceTo(0, 0);
// Ask the user a question and wait for an answer
self.ask("What's your name?");
// Check whether a key is currently pressed
self.isKeyPressed("any");
// Check whether the mouse button is pressed
self.mouseDown;
// Get the mouse pointer's x position
self.mouseX;
// Get the mouse pointer's y position
self.mouseY;
// Get the width of the stage
self.width;
// Get the height of the stage
self.height;
// Get a property of another sprite or the stage
$["Stage"].width;
// Check whether turbo mode is enabled
Scrap.isTurbo();
// Check whether the sprite can be dragged
self.draggable;
// Set whether the sprite can be dragged
self.draggable = true;
// Reset the timer back to zero
self.resetTimer();
// Get the number of seconds since the timer was reset
self.getTimer();
// Get a part (such as the year) of a specific date
new Date("2026-06-30").getFullYear();
// Show a confirmation dialog and get a yes/no answer
window.confirm("Are you sure?");