Bobmr2024 Bobmr2024 loading
// Motion

move (10) steps
turn cw (15) degrees
turn right (15) degrees
turn ↻ (15) degrees
turn ccw (15) degrees
turn left (15) degrees
turn ↺ (15) degrees

point in direction (90 v)
point towards [ v]

go to x: (0) y: (0)
go to [mouse-pointer v]
glide (1) secs to x: (0) y: (0)

change x by (10)
set x to (0)
change y by (10)
set y to (0)

if on edge, bounce

set rotation style [left-right v]

(x position)
(y position)
(direction)



// Looks

say [Hello!] for (2) secs
say [Hello!]
think [Hmm...] for (2) secs
think [Hmm...]

show
hide

switch costume to [costume1 v]
next costume
switch backdrop to [backdrop1 v]

change [color v] effect by (25)
set [color v] effect to (0)
clear graphic effects

change size by (10)
set size to (100)%

go to front
go back (1) layers

(costume #)
(backdrop name)
(size)

// (Stage-specific)

switch backdrop to [backdrop1 v] and wait
next backdrop

(backdrop #)



// Sound

play sound [pop v]
play sound [pop v] until done
stop all sounds

play drum (1 v) for (0.2) beats
rest for (0.2) beats

play note (60 v) for (0.5) beats
set instrument to (1 v)

change volume by (-10)
set volume to (100)%
(volume)

change tempo by (20)
set tempo to (60) bpm
(tempo)



// Pen

clear

stamp

pen down
pen up

set pen color to [#f0f]
change pen color by (10)
set pen color to (0)

change pen shade by (10)
set pen shade to (50)

change pen size by (1)
set pen size to (1)



// Variables

set [var v] to [0]
change [var v] by (1)
show variable [var v]
hide variable [var v]



// List

add [thing] to [list v]

delete (1 v) of [list v]
insert [thing] at (1 v) of [list v]
replace item (1 v) of [list v] with [thing]

(item (1 v) of [list v])
(length of [list v])
<[list v] contains [thing]>

show list [list v]
hide list [list v]



// Events

when gf clicked
when green flag clicked
when flag clicked
when ⚑ clicked
when [space v] key pressed
when this sprite clicked
when backdrop switches to [backdrop1 v]

when [loudness v] > (10)

when I receive [message1 v]
broadcast [message1 v]
broadcast [message1 v] and wait



// Control

wait (1) secs

repeat (10)
end

forever
end

if <> then
end

if <> then
else
end

wait until <>

repeat until <>
end

// caps!

stop [all v]

stop [this script v]

// stack

stop [other scripts in sprite v]

stop [other scripts in stage v]

when I start as a clone
create clone of [myself v]
delete this clone



// Sensing

<touching [ v]?>
<touching color [#f0f]?>
<color [#f0f] is touching [#0f0]?>
(distance to [ v])

ask [What's your name?] and wait
(answer)

<key [space v] pressed?>
<mouse down?>
(mouse x)
(mouse y)

(loudness)

(video [motion v] on [this sprite v])
turn video [on v]
set video transparency to (50)%

(timer)
reset timer

([x position v] of [Sprite1 v])

(current [minute v])
(days since 2000)
(username)
(user id)



// Operators

(() + ())
(() - ())
(() * ())
(() / ())

(pick random (1) to (10))

<[] < []>
<[] = []>
<[] > []>
&lt;[] &lt; []&gt;
&lt;[] &gt; []&gt;

<<> and <>>
<<> or <>>
<not <>>

(join [hello ] [world])
(letter (1) of [world])
(length of [world])

(() mod ())
(round ())

([sqrt v] of (9))


// PicoBoard

when [button pressed v]

when [slider v] [> v] (50)

<sensor [button pressed v]?

([slider v] sensor value)

// Lego WeDo 1.0

turn [motor v] on for (1) secs

turn [motor v] on

turn [motor v] off

set [motor v] power to (100)

set [motor v] direction to [this way v]

when distance [< v] (20)

when tilt [= v] (20)

(distance)

(tilt)

// Lego WeDo 2.0

turn [motor v] on for (1) seconds

turn [motor v] on

turn [motor v] off

set [motor v] power to (100)

set [motor v] direction to [this way v]

set light color to (50)

play note (60 v) for (0.5) seconds

when distance [< v] (50)

when tilted

(distance)

(tilt [up-down v])


// Obsolete Scratch 1.4 blocks:


// Looks

switch to costume [costume1 v]

switch to background [background1 v]
next background
(background #)



// Control

if <>
end

forever if <>
end

stop script
stop all



// Events

when Sprite1 clicked



// Sensing

<loud?>



// Grey

. . .
...