Default Value

Default Values are the default arguments values in blocks when shown in the block palette. Every block with an insert has default values, even if they are blank.

If a reporter block is put into an insert and taken out of it again, however, it will revert to 10 in a number insert and a blank string in a string insert.

The default value of a block is generally a common value that most people will not have to change. For example, the change () by () block has a default value of 1. This way it functions as a score keeper, timer, or counter. They can also serve to show how the block functions. For example, the Join block has the default values "hello " and "world". When a user sets a variable to the block to see the output, he or she sees "hello world", which explains the function of the block (concatenation) instantly.

A boolean insert's default value is "false", even though they do not show their value. This can be tested by simply running this script (notice the empty Boolean insert, where we make the block use the default value):

when gf clicked
if <> then
say [True]
else
say [False] //The sprite would say this. Try it!
end

List of Default Values

Caution.png This article or section is currently undergoing major changes by 3sal2 (talk | contribs). Please avoid largely modifying this page's contents until this template has been removed.
Block Default Values
move () steps 10
turn cw () degrees and turn ccw () degrees 15
point in direction ( v) 90
point towards [ v] and go to [ v] The mouse-pointer
go to x: () y: () 0 and 0
glide () secs to x: () y: () 1, 0, and 0
change x by () and change y by () 10
set rotation style [ v] Left-right
when [ v] key pressed Space
when backdrop switches to [ v]
when [ v] > () Loudness, 10
when I receive [ v], broadcast [ v], and broadcast [ v] and wait message1
say [] for () secs Hello!, 2
say [] Hello!
think [] for () secs Hmm..., 2
think [] Hmm...
switch costume to [ v]
switch backdrop to [ v] and switch backdrop to [ v] and wait
change [ v] effect by () Color, 25
set [ v] effect to () Color, 0
change size by () 10
set size to () % 100
go back () layers 1
wait () secs 1
repeat () 10
Empty Boolean inputs False
stop [ v] All
create clone of [ v] in a sprite Myself
create clone of [ v] in the Stage
play sound [ v] and play sound [ v] until done
play drum ( v) for () beats 1 (snare drum), 0.25
rest for () beats 0.25
play note ( v) for () beats 60 (middle C), 0.5
play drum ( v) for () beats 1 (snare drum), 0.25
set instrument to ( v) 1 (piano)
change volume by () -10
set volume to () % 100
change tempo by () 20
set tempo to () bpm 60
<touching [ v]?> mouse-pointer
(distance to [ v]) mouse-pointer
Color inputs A random color
ask [] and wait What's your name?
<key [ v] pressed?> Space
(video [ v] on [ v]) in a sprite Motion, this sprite
(video [ v] on [ v]) in the Stage Motion, Stage
turn video [ v] On
set video transparency to () % 50
([ v] of [ v]) X position,
change pen color by () and change pen shade by () 10
set pen color to () 0 (red)
set pen shade to () 50
change pen size by () 1
set pen size to () 1
(() + ()), (() - ()), (() * ()), (() / ()), and (() mod ()) Blanks
(pick random () to ()) 1 and 10
<[] < []>, <[] = []>, and <[] > []> Blanks
(join [] []) hello and world
(letter () of []) 1 and world
(length of ()) world
(round ()) Blank
([ v] of ()::operators) Sqrt (square root) and 9
set [ v] to [] , 0
change [ v] by () , 1
show variable [ v] and hide variable [ v]
add [] to [ v] thing,
delete ( v) of [ v] 1,
insert [] at ( v) of [ v] thing, 1,
replace item ( v) of [ v] with [] 1, , thing
(item ( v) of [ v]) 1,
<[ v] contains []?> , thing
show list [ v] and hide list [ v]
turn [ v] on for () secs Motor, 1
turn [ v] on and turn [ v] off Motor
set [ v] power to () Motor, 100
set [ v] direction to [ v] Motor, this way
when distance [ v] () <, 20
when tilt [ v] () =, 1
when [ v] Button pressed
when [ v] [ v] () slider, >, 50
<sensor [ v]?> Button pressed
([ v] sensor value) Slider

See Also

  • This page was last modified on 15 October 2016, at 04:34.