Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » [scratchblocks] OFFICIAL testing topic
- Studio04040807
-
Scratcher
100+ posts
[scratchblocks] OFFICIAL testing topic
when gf clicked
set [variable1 v] to(the code{say ( join(join [Hello,](input1 :: custom-arg))[! Welcome to my profile!])} :: operators
forever
if <[my v] profile visited :: sensing>
if <(you :: sensing) = ((Scratcher) or (New Scratcher))>
run code (variable1) with (1)inputs, (username) in place of (input1:: custom-arg):: control
else
run code ( the code{say [This is my profile!]} :: operators) with (0) inputs :: control
end
end
Last edited by Studio04040807 (March 8, 2016 02:43:49)
- TheBoys4
-
Scratcher
57 posts
[scratchblocks] OFFICIAL testing topic
when red button clicked::hat events
- KEL5isGod
-
Scratcher
27 posts
[scratchblocks] OFFICIAL testing topic
when green flag clicked
forever
say [KEL is epic!] for (2) secs
end
- Nice_Flame
-
Scratcher
100+ posts
[scratchblocks] OFFICIAL testing topic
When [Prophecy maker] = [off v]::control hat
then:: pen cstart
set [Prophecy maker] to [on v]
add [After the sharp-eyed jay and the roaring lion, peace will come on dove’s gentle wing.] to [Prophecy maker v]
add [A dark territory will arise and shadows will take over the forest.] to [Prophecy maker v]
add [A willow will bloom only to be withered by a vine's root.] to [Prophecy maker v]
- nprasad
-
Scratcher
100+ posts
[scratchblocks] OFFICIAL testing topic
switch costume to [((costume #) - (1)) v]
Is it going to work? If not, can someone help?
- Luigi_FTW
-
Scratcher
16 posts
[scratchblocks] OFFICIAL testing topic
say [HEY LOOK!] for (2) secs
say [ITS MY NEW GAME!] for (2) secs
set [Luigi_FTWS NEW GAME] to [Super Platformer! ]
———–>URL/ LINK<———-
https://scratch.mit.edu/projects/92681238/
Last edited by Luigi_FTW (March 9, 2016 21:59:19)
- FrenchFries8854
-
Scratcher
37 posts
[scratchblocks] OFFICIAL testing topic
send [Var v] to x:()y:()::variables
- GiorgosKarvelas365
-
Scratcher
100+ posts
[scratchblocks] OFFICIAL testing topic
((4) ^ (10)::operators)
stop all pinks::sound
- VMan_2002
-
Scratcher
61 posts
[scratchblocks] OFFICIAL testing topic
define make $ (money) using (item) (succeed) else (fail)
script variables (money made :: list) ◄► :: grey // This comes from BYOB/Snap!
set [money made v] to [0] :: list
repeat until <<(money made :: list) = (money)> or <(tries ::list) = [4]>>
buy (item) if success :: operators cstart
sell (item) at price ((price of (item):: sensing) * (1.1)) if success:: operators cstart
change [money made v] by ((price of (item) :: sensing) * (1.1)) :: list
set [tries v] to [0] :: list
else
change [tries v] by (1) :: list
end
else
change [tries v] by (1) :: list
end
end
if ((tries :: list) = [4])
run (fail) ► :: control // these come from BYOB/Snap! too
else
run (succeed) ► :: control
end
when gf clicked
make $ ((price of [wii u]:: sensing) + (12)) using [candy] :: custom cstart // I WISH I COULD DO THIS
buy [wii u] if success :: operators cstart
... // play Wii U
else
say [Inflation. It ruined me.] for (2) secs
press green flag :: events
end
else
say [* it!]
Last edited by VMan_2002 (March 9, 2016 22:39:10)
- VMan_2002
-
Scratcher
61 posts
[scratchblocks] OFFICIAL testing topic
switch costume to [((costume #) - (1)) v]
Is it going to work? If not, can someone help?
switch costume to ((costume #) - (1))
- ivenTemmie
-
Scratcher
11 posts
[scratchblocks] OFFICIAL testing topic
.-. This is all so confusing
when [ v] key pressed
play sound [ v] until done
show variable [<color [#00ff00] is touching [#0000ff] ?>(join [] [world]) v]
[/sci have no idea what im doingratchblocks]
- ivenTemmie
-
Scratcher
11 posts
[scratchblocks] OFFICIAL testing topic
Ummmm how about this
Idk im not good at this
when green flag clicked
say i think i did somthing for (2) secs
think i may have failed for (2) secs
forever
turn cw 100 degrees
move 100 steps
end
Idk im not good at this

- FrenchFries8854
-
Scratcher
37 posts
[scratchblocks] OFFICIAL testing topic
((4) ^ (10)::lists)
stop all pinks::sound
- Owengren
-
Scratcher
100+ posts
[scratchblocks] OFFICIAL testing topic
.-. This is all so confusingThis is how you do it:
when [ v] key pressed
play sound [ v] until done
show variable [<color [#00ff00] is touching [#0000ff] ?>(join [] [world]) v]
when [space v] key pressed
play sound [meow v] until done
show variable <<color [#00ff00] is touching [#0000ff] ?> >(join [hello] [world])>
- Ninkancho
-
Scratcher
500+ posts
[scratchblocks] OFFICIAL testing topic
Quote this to view code.
when green flag clicked
say [i think i did somthing] for (2) secs
think [i may have failed] for (2) secs
forever
turn cw (100) degrees
move (100) steps
end
- Zixxy
-
Scratcher
45 posts
[scratchblocks] OFFICIAL testing topic
when green flag clicked
ask [Does This Work?] and wait
- VMan_2002
-
Scratcher
61 posts
[scratchblocks] OFFICIAL testing topic
when green flag clicked
ask [Does This Work?] and wait
when asked a question :: hat sensing
if <(question :: sensing) = [Does This Work?]>
say [Yes.]
end
// This isn't a normal one
- cs277227
-
Scratcher
38 posts
[scratchblocks] OFFICIAL testing topic
Time for the workarounds!
Give me a workaround for this block:

Give me a workaround for this block:

- Ninkancho
-
Scratcher
500+ posts
[scratchblocks] OFFICIAL testing topic
when I receive [something v]
set [variable v] to [1]
...::hat
forever
wait until <(variable) = [1]>
set [variable v] to [0]
...
end
Not perfect, but yeah. For <[something v] received ever?>, take out the {set [variable v] to [0]}. For <[something v] received since @greenFlag clicked?> set the variable to 0 under a flag hat.













