Documentation v2.0

Command Reference

Unlock the full potential of GridX. Use these commands to build powerful scripts. Click any card to expand for details and code examples.

open_with Core Movement

east
player.move(direction) Basic single-cell navigation step.
Standard expand_more

Moves the player exactly one grid unit. If the move is invalid (e.g. hitting a wall), the execution will crash and stop. Supports both full names and shorthands.

player.move('right'); // Full version
player.move('u');     // Shorthand for Up
fast_forward
player.run(direction) Covers twice the distance instantly.
Express expand_more

A high-speed alternative that moves the character two cells in a single command. Equivalent to calling move() twice.

player.run('down');
player.run('l'); // Fast left navigation

touch_app Interactions

vpn_key
player.take("item") Picks up an item from the specific spot.
Action expand_more

Used to collect items (like keys) that are on the same cell as the player.

player.take('key'); // Picks up the key
lock_open
player.open("door") Unlocks a locked door.
Action expand_more

Opens a locked door. You must be adjacent to the door or directly on it, and have already collected a key.

player.open('door');
swipe_right
player.push("box") Pushes a nearby box 1 block away.
Physics expand_more

If you are standing directly next to a box, this pushes the box 1 space away from you. Box cannot be pushed into walls or boundaries.

player.push('box');
swipe_left
player.pull("box") Pulls a nearby box towards you.
Physics expand_more

If you are standing directly next to a box, you take a step backward and drag the box into the space you just left.

player.pull('box');

memory Programmable Logic

visibility
canMove(direction) Check if the path is clear.
Detection expand_more

Returns true if the cell in the specified direction is within the grid boundaries and accessible. Use it to avoid crashing.

if (canMove('right')) {
  player.move('right');
}
change_circle
for(N) { ... } Execute code blocks in loops.
Looping expand_more

A high-level loop command that repeats all instructions inside the curly braces N times. This keeps your code clean and manageable.

for(5) {
  player.move('r');
  player.move('d');
}
alt_route
if / else Decision making for dynamic runs.
Decisions expand_more

Control the flow of your script based on conditions. The else block is optional and executes if the condition is false.

if (canMove('up')) {
  player.move('u');
} else {
  player.move('r'); 
}
data_object
function name() { ... } Create reusable code blocks.
Structure expand_more

Define custom functions to group commands together. Call your function anywhere in the script to avoid repeating code.

function moveAngle() {
  player.move('r');
  player.move('d');
}

moveAngle();

explore Direction Aliases

Right

'right' or 'r'

Left

'left' or 'l'

Up

'up' or 'u'

Down

'down' or 'd'