Bilup extras
Bilup is built on TurboWarp, which is built on Scratch. Along the way both projects added blocks that stock Scratch does not have. This page collects those extra blocks in one place. Each one lives in its normal category and is also linked from that category's page. For extension blocks (Pen, Music, and so on) see Extensions instead; this page is only the built-in extras.
Some of these blocks are shown in the palette by default; others are compatibility or advanced blocks that come from imported projects or from turning on the right addon. They all run the same way in the compiler and interpreter.
Motion
- point towards x:
0y:0faces a specific coordinate instead of a menu target. - point towards x:
0y:0from x:0y:0faces from one coordinate toward another.
See Motion blocks.
Control
- while
<condition>loops while a boolean stays true (the inverse ofrepeat until). - for each
itemin10loops a set number of times, setting a variable to 1, 2, 3, and so on. - all at once runs its wrapped blocks in a single frame with no screen-refresh yielding. Kept for compatibility with older projects; ordinary scripts under warp behave the same.
- switch
expression/ casevalue/ default / break build a switch statement.switchpicks a branch by matching value; a plaincaseruns its branch and stops;defaultruns when nothing matches;breakand case fall-through control let one case continue into the next. - counter (reporter), increment counter, set counter to
0are a simple built-in counter carried over from Scratch 2, so you can count without making a variable.
See Control blocks.
Operators
- letters
1to3ofapplereturns a substring between two positions. iteminapplereturns the position of a substring (case-insensitive), or 0 if not found.- replace
awith-inapplereplaces every occurrence of a substring (case-insensitive). abrepeated3times repeats a string.upper/lowercase ofApplechanges the case of text.- trim
appleremoves surrounding whitespace. - clamp
5between0and10limits a number to a range. - min / max return the smaller or larger of their operands.
- pi reports 3.14159...
- newline reports a line-break character.
See Operators blocks.
Sensing
- online? reports whether the device has a network connection (
navigator.onLine). - stage width / stage height report the stage size in pixels.
See Sensing blocks.
Variables and data
listas JSON reports a list as a JSON array string.
See Variables and lists.
My Blocks
- return
valueends a custom block and hands a value back to the caller, letting a custom block act as a reporter. - is compiled? / is bilup? are special boolean argument-reporter names:
is compiled?reports true when the compiler is running,is bilup?always reports true here.
See My Blocks.