FANDOM


Text Blocks are a means of showing scripts in the Scratch Forums when the normal block images are avoided or when uploading an image is too tedious.

UseEdit

Text Blocks are simply typed as text, but with rules:

  • C Blocks (those that wrap around others) are typed as two lines, as in the example below. To end the block, the word is joined with the "prefix" end.

forever

move (10) steps

endforever

  • Blocks placed inside C blocks are indented with three spaces (" "), but on sites such as this wiki indents are needed.

repeat ( 5)

change x by (5)

endrepeat

  • Text bubbles are typed as parentheses, unless the described blocks are the Say and Think ones:

change x by (10)

say [Hi there!] for (3) secs

  • Drop-down boxes are typed as brackets:

broadcast [example]

go to [mouse-pointer]

  • Blocks are uncapitalized unless they are Hat Blocks:

When Green Flag Clicked

When [up arrow] Key Pressed

play sound [meow]

<( ) + ( )>

(variable)

  • Spaces inside text bubbles are optional.

letter () of ( )

  • The "If Else" block is ended with an "endif"

if <touching [edge]>

set [touching] to (1)

else

set [touching] to (0)

endif

ComparisonEdit

These text scripts bear some resemblance to actual scripts, but the color is a disadvantage - however, BBCode can always be used to fake it.

Basic scripting

When Green Flag Clicked

forever

go to x (0) y (0)

endforever

Another basic script

When [space] key pressed

repeat (10)

play sound [meow]

endrepeat

Life loss

When Green Flag Clicked

forever

if <touching [edge]>
if <((lives)) < (1)>
broadcast [You Lose]
else
change [Lives] by (-1)
endif
endif

endforever

VariationsEdit

Many variations of these methods are used, although the same principles remain. For example, a user might type "letter () of ()" instead of "(letter () of () )" or even as (letter [] of []). However, when there are double parentheses included (ex. (( or )) ) users will usually seperate them by a space.

Another commonly used variation is leaving out the "end if's" and "end forever's".

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.