⚡ G-Warp

Block categories

Blocks are the pieces of code you snap together. The exact palette depends on the selected sprite and enabled extensions.

Core block reference

The tables below use the familiar Scratch-style labels and show a tiny way to try each core block. Dropdown options are shown in brackets and number/text inputs in parentheses. A block may be Stage-only, sprite-only, permission-dependent, or absent when a category/extension isn't available; check the selected target and the actual palette in your build. These examples are a learning reference, not a claim that ChatGPT has live-tested every block.

Motion — move a sprite and read its position
Block labelWhat it doesTiny try-it
move (10) stepsMoves forward in the direction the sprite faces.Point in direction (90), then move (20) steps.
turn clockwise (15) degreesTurns right by the chosen angle.Turn clockwise (90) degrees.
turn counterclockwise (15) degreesTurns left by the chosen angle.Turn counterclockwise (45) degrees.
go to [random position]Moves instantly to the selected target or position option.Choose [mouse-pointer] to follow the pointer.
go to x: (0) y: (0)Moves instantly to a coordinate.Go to x: (100) y: (0).
glide (1) secs to [random position]Moves smoothly to the selected target/position.Glide (1) secs to [mouse-pointer].
glide (1) secs to x: (0) y: (0)Moves smoothly to a coordinate over time.Glide (1) secs to x: (100) y: (0).
point in direction (90)Sets the sprite's direction.Point in direction (90), then move (20) steps.
point towards [mouse-pointer]Faces a target.Point towards [mouse-pointer].
change x by (10)Moves horizontally relative to the current position.Change x by (10), then change x by (-10).
set x to (0)Sets the horizontal coordinate.Set x to (0).
change y by (10)Moves vertically relative to the current position.Change y by (10).
set y to (0)Sets the vertical coordinate.Set y to (0).
if on edge, bounceTurns the sprite away from the Stage edge.Forever: move (5) steps; if on edge, bounce.
set rotation style [left-right]Chooses how the costume turns with direction.Try [left-right] when the sprite should not flip upside down.
(x position)Reports the sprite's horizontal coordinate.Say (x position).
(y position)Reports the sprite's vertical coordinate.Say (y position).
(direction)Reports the direction in degrees.Say (direction).

Gotcha: Motion blocks do nothing on the Stage itself; select a sprite first. The x/y coordinates are Stage coordinates, not pixels in your computer screen.

Looks — change costumes, bubbles and layers
Block labelWhat it doesTiny try-it
say [Hello!] for (2) secondsShows a speech bubble temporarily.Say [Hi!] for (2) seconds.
say [Hello!]Shows a speech bubble until another action replaces it.Say [I am here!].
think [Hmm...] for (2) secondsShows a thought bubble temporarily.Think [What next?] for (2) seconds.
think [Hmm...]Shows a thought bubble.Think [Let's try!].
switch costume to [costume1]Changes the sprite's costume.Switch costume to [walk 1].
next costumeMoves to the next costume in the list.Repeat forever: next costume; wait (0.1) seconds.
switch backdrop to [backdrop1]Changes the Stage background.On the Stage, switch backdrop to [backdrop1].
next backdropMoves to the next backdrop in the list.On the Stage, next backdrop.
change size by (10)Adds to the current size percentage.Change size by (10).
set size to (100)%Sets size to a percentage.Set size to (50)%.
change [color] effect by (25)Adjusts the chosen visual effect.Change [color] effect by (25).
set [color] effect to (0)Sets the chosen visual effect value.Set [color] effect to (0).
clear graphic effectsResets graphic effects.Apply an effect, then clear graphic effects.
showMakes the sprite visible.Show.
hideMakes the sprite invisible.Hide, then show.
go to [front] layerMoves the sprite in front of/behind other sprites using the dropdown.Go to [front] layer.
go [forward] (1) layersMoves the sprite forward/backward in the layer order.Go [forward] (1) layers.
(costume [number])Reports the current costume's number.Say (costume [number]).
(costume [name])Reports the current costume's name.Say (costume [name]).
(backdrop [number])Reports the current backdrop's number.Say (backdrop [number]) from a Stage script.
(backdrop [name])Reports the current backdrop's name.Say (backdrop [name]) from a Stage script.
(size)Reports the sprite's size percentage.Say (size).

Gotcha: Backdrop blocks belong to the Stage. next costume follows the costume-list order; keep frames in order for a walk cycle.

Events — start scripts and send messages
Block labelWhat it doesTiny try-it
when flag clickedStarts this stack when Start/Green Flag is pressed.when flag clicked → say [Ready!].
when [space] key pressedStarts when the chosen key is pressed.when [space] key pressed → change y by (10).
when this sprite clickedStarts when this sprite is clicked on the Stage.when this sprite clicked → change [Score] by (1).
when stage clickedStarts when the Stage is clicked (Stage-only use).when stage clicked → next backdrop.
when backdrop switches to [backdrop1]Starts when the Stage changes to that backdrop.when backdrop switches to [backdrop1] → say [New scene!].
when [loudness] > (10)Starts when the selected live input passes a threshold, if available.Set a higher threshold and test in a quiet room.
when I receive [message1]Starts when a matching broadcast arrives.when I receive [score point] → change [Score] by (1).
broadcast [message1]Sends an event message without waiting for receivers to finish.broadcast [start level].
broadcast [message1] and waitSends an event message and waits for receiver scripts to finish.broadcast [save done] and wait.

Gotcha: A clicked-event hat belongs to the target that owns the script. A broadcast only runs receiver scripts that use the same message name.

Control — repeat, wait, choose and clone
Block labelWhat it doesTiny try-it
wait (1) secondsPauses this script for the specified time.Wait (0.5) seconds.
repeat (10)Runs the nested stack the requested number of times.Repeat (4): move (10) steps.
foreverRepeats the nested stack until the project is stopped.Forever: next costume; wait (0.1) seconds.
if <condition> thenRuns the nested stack only when the condition is true.If <touching [edge]?> then, turn.
if <condition> then elseChooses one stack based on a condition.If <(Score) > (9)> then say [Win!] else say [Keep going!].
wait until <condition>Waits until a condition becomes true.Wait until <key [space] pressed?>.
repeat until <condition>Repeats until a condition becomes true.Repeat until <(y position) < (-170)>: change y by (-5).
stop [all]Stops the selected scope of running scripts.Use Stop all at the end of a short test.
create clone of [myself]Creates a copy of the sprite for a temporary object.Create clone of [myself], then wait (0.5) seconds.
when I start as a cloneStarts the clone's setup script after it is created.when I start as a clone → show.
delete this cloneRemoves the running clone.At the end of a falling-star script, delete this clone.

Gotcha: The current machine-readable fixture notes say repeat (2.7) runs 3 times, but the older prose file grok/TESTS.txt still says 2. This discrepancy needs a fresh v15.48.0 run before it is treated as a verified parity guarantee. The regular clone limit is 300; the reported Infinite Clones safety ceiling is 5,000. These are safeguards, not performance targets.

Sensing — ask questions and check the Stage
Block labelWhat it doesTiny try-it
touching [mouse-pointer]?Checks whether the sprite touches the target.If <touching [mouse-pointer]?> then say [Hello!].
touching color [#000000]?Checks for contact with the chosen color.If touching a black wall, stop moving.
color [#000000] is touching [#ffffff]?Checks whether two chosen colors touch.Use it to test a player against a colored platform.
distance to [mouse-pointer]Reports distance to the chosen target.If (distance to [mouse-pointer]) < (50), show.
ask [What's your name?] and waitAsks a question and waits for an answer.Ask [Favorite color?] and wait.
(answer)Reports the latest answer.Ask [Type 3] and wait; say (answer).
key [space] pressed?Checks whether a key is down.If <key [space] pressed?> then change y by (10).
mouse down?Checks whether a mouse button is pressed.If <mouse down?> then change [Score] by (1).
(mouse x)Reports the pointer's horizontal Stage coordinate.Go to x: (mouse x) y: (0).
(mouse y)Reports the pointer's vertical Stage coordinate.Go to x: (0) y: (mouse y).
set drag mode to [draggable]Sets whether the sprite can be dragged by the pointer when supported.Set drag mode to [draggable] to let the player move it.
(loudness)Reports microphone/input loudness if supported and permitted.Say (loudness) after granting permission if prompted.
(username)Reports the current account name if this block is available. Treat the result as personal information.Do not display or share it in a classroom project.
(timer)Reports elapsed time since the timer was reset.Reset timer; wait (1) seconds; say (timer).
reset timerSets the timer to zero.Reset timer just before a timed challenge.
(current [year])Reports the selected date/time field.Say (current [year]).
(days since 2000)Reports days since the start of year 2000.Say (days since 2000) to inspect it.
([attribute] of [Sprite1])Reads an available property from a sprite or the Stage.Say ([x position] of [Sprite1]).

Gotcha: Input-sensitive blocks such as loudness depend on supported hardware and permissions. Date/time and object-attribute dropdowns have multiple options; choose the specific field you need.

Operators — calculate, compare and build text
Block labelWhat it doesTiny try-it
(() + ())Adds numbers.Say ((2) + (3)).
(() - ())Subtracts the second number from the first.Say ((10) - (4)).
(() * ())Multiplies numbers.Say ((3) * (4)).
(() / ())Divides numbers.Say ((8) / (2)).
pick random (1) to (3)Chooses a random value, including the endpoints.Repeat: set [Roll] to (pick random (1) to (3)).
<() < ()>Checks whether the first value is smaller.If <(2) < (5)> then say [yes].
<() = ()>Checks whether values are equal under the project's text/number rules.If <[abc] = [ABC]> then say [same].
<() > ()>Checks whether the first value is larger.If <(9) > (3)> then say [yes].
<() and ()>True only when both conditions are true.If <(Score) > (0) and <key [space] pressed?>> then move.
<() or ()>True when either condition is true.If <key [left arrow] pressed? or <key [right arrow] pressed?>> then move.
<not ()>Reverses a Boolean result.If <not <mouse down?>> then say [Release].
join [hello] [world]Combines two pieces of text with no separator added automatically.join [H] [i] produces [Hi], not [H i].
letter (1) of [world]Reports one character by position.Say (letter (1) of [Warp]).
length of [world]Reports the number of characters in text.Say (length of [G-Warp]).
<[text] contains [thing]?>Checks whether a piece of text contains another piece of text.If <[hello] contains [ell]?> then say [Found].
(() mod ())Reports the remainder using the project's modulo rule.Say ((10) mod (3)).
round ()Rounds a number to an integer using the runtime's rounding rule.Say (round (2.5)).
([sqrt] of (9))Applies the selected math function.Say ([sqrt] of (9)).

Gotcha: The recorded fixtures expect round (-2.5) to produce -2 and (-10) mod 3 to produce 2. Random values include both selected endpoints. join inserts no spaces unless you put a space into one of its inputs.

Variables — store a score or game state
Block labelWhat it doesTiny try-it
set [Score] to (0)Replaces the variable's current value.when flag clicked → set [Score] to (0).
change [Score] by (1)Adds a number to the variable's current value.when this sprite clicked → change [Score] by (1).
show variable [Score]Shows the variable monitor on the Stage.Show variable [Score] before a score test.
hide variable [Score]Hides the variable monitor without deleting its value.Hide variable [Score] when the round ends.

Gotcha: A variable's scope matters: create a shared score for the whole game, or a sprite-only variable if each sprite needs its own value. Reset it when a new round begins.

Lists — store an ordered collection of items
Block labelWhat it doesTiny try-it
add [apple] to [Names]Adds a new item at the end of a list.Add [Ada] to [Names].
delete (1) of [Names]Removes an item at a position.Delete (1) of [Names].
delete all of [Names]Removes every item from the list.Reset a high-score list before testing.
insert [apple] at (1) of [Names]Inserts an item at a chosen position.Insert [Ada] at (1) of [Names].
replace item (1) of [Names] with [apple]Replaces the item at a position.Replace item (last) of [Names] with [Winner].
(item (1) of [Names])Reports the item at a position.Say (item (1) of [Names]).
(item # of [apple] in [Names])Reports the position where an item appears.Say (item # of [Ada] in [Names]).
(length of [Names])Reports the number of items in the list.Say (length of [Names]).
<[Names] contains [Ada]?>Checks whether the list contains the chosen item.If <[Names] contains [Ada]?> then say [Found].
show list [Names]Shows the list monitor on the Stage.Show list [Names] to inspect the list's contents.
hide list [Names]Hides the list monitor without deleting its items.Hide list [Names] after the test.

Gotcha: The index input can use named positions such as last and random in supported list operations. The recorded fixture says inserting at position 0 is a no-op, and item # of a missing value returns 0. Verify edge cases on the current build.

Behavior notes from the parity files

Parity source notes: machine-readable fixtures and Grok's prose test list. They are source/test-design notes, not proof every case has passed in G-Warp.

Editing scripts

Drag blocks from the palette and snap them together. Right-click in the code area for available actions such as block search, duplicate and comments. Comments help people understand a script; they do not run as code. If a block behaves differently from Scratch, record the smallest project that reproduces it.

Bug Hunter

The project’s release notes describe Bug Hunter as an achievement for finding bugs. It is a bug-finding challenge, not a guarantee that the app has been fully tested. When you find a problem, write down the steps, expected result and actual result before reporting it.

Power lines

When enabled in More → Settings, Power lines draw a visual connection from a broadcast block to matching “when I receive” scripts, and from a custom-block definition to its uses. They are a debugging aid drawn over the workspace, not extra code. Turn them off in Settings if the lines distract you.

← Documentation home · Back to website