Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Official [scratchblocks] Testing Topic 4
- CoolCoder148698
- Scratcher
87 posts
Official [scratchblocks] Testing Topic 4
Don't pay attention to this, I am just helping out @Alaxantra with some scripts. You can see here . So @Alaxantra , to make a background scroll around your mouse, add this code:
(Do this in a new sprite, you require at-least 2 costumes for bg)
(Do this in a new sprite, you require at-least 2 costumes for bg)
when green flag clicked
set [clone v] to [0]
repeat (2)
change [clone v] by (1)
create clone of [myself v]
end
set y to (0)
forever
set x to (mouse x)
end
when I start as a clone
next costume
if <(clone) = [1]> then
forever
set x to ((mouse x) - (360))
end
end
if <(clone) = [2]> then
forever
set x to ((mouse x) + (360))
end
end
Last edited by CoolCoder148698 (Jan. 21, 2022 07:03:09)
- Fancade-Arcade-Games
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
when green flag clicked
say [Sorry, Let's close the topic]
play sound [Game Over v] until done
- bingula
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
when green flag clicked
say [Sorry, Let's close the topic]
play sound [Game Over v] until done
when topic is [closed v] :: hat sensing
wait until <[scratchblocks testing topic 5] has [come v] :: operators> :: control
Last edited by bingula (Jan. 21, 2022 12:06:27)
Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras.
- scratchgodo
- Scratcher
1000+ posts
Official [scratchblocks] Testing Topic 4
script :: hat :: sound // The script that say's hi. :)
Hi <hi:: looks> (hi :: pen){
turn script :: motion
}{
change [meow v] effect by (25)}{
scratch :: events} :: pen :: cap
Last edited by scratchgodo (Jan. 21, 2022 13:22:31)
(Thanks to butterfly_cat8 for part of the thumbnail for Cat TV used in this banner.)
Suggest purple things on my profile I can feed to Cat Posts, Cat Comments, Cat Replies or even better the Cat Profile in the link.
- Stinkyfrogthing
- Scratcher
20 posts
Official [scratchblocks] Testing Topic 4
define pen poo
set pen color to [#964B00]
set pen size to (50)
go to x: (0) y: (0)
pen down
glide (1) secs to x: (60) y: (0)
set volume to (1000) %
play sound [plop v]
pen up
Last edited by Stinkyfrogthing (Jan. 21, 2022 17:54:11)
- mcsquaggle
- Scratcher
500+ posts
Official [scratchblocks] Testing Topic 4
when green flag clicked
say [Sorry, Let's close the topic]
play sound [Game Over v] until done
wait wat?
wait until <??::#758efb>
uhh ueah
im a furry.
uhh they/them
and i like Exolite and Lunar Halycon Emission :3
(:>::#bb88f6) //jerry says hi
- ImSandwich
- Scratcher
43 posts
Official [scratchblocks] Testing Topic 4
Hello
This is a Signature
I have no purpose for this.
This is Entertaining
- windows7cr_exe
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
This is cool! :)//So... I made custom blocks in Snap!
//Btw, some of you may say, "Hey, there's already a <() contains ()?> block!".
//Well, technically, you guys are right, it is in SCRATCH. But NOT in Snap!
<((text1) :: #00c290) contains ((text2) :: #00c290)? :: #00c290> :: control hat
set [? contains ? List v] to (list [] @delInput @addInput :: list)
set [? contains ? Variable v] to [0]
repeat (length of text (text1) :: operators)
change [? contains ? Variable v] by [1]
add (letter (? contains ? Variable :: variables) of (text1)) to (? contains ? List)
end
if <(? contains ? List) contains (text2) :: list> then
report <<true⠀(:: #dedede) :: #23ed21> :: operators> :: control cap
else
report <<(:: #dedede)⠀false:: #c90c0c> :: operators> :: control cap
end
//This next block requires the one I made above
(point towards x: ((X) :: #00c290) y: ((Y) :: #00c290) :: stack #00c290) :: control hat
point in direction ((<((X) - (x position)) contains [-] :: #00c290> * (180)) - ([atan v] of (((Y) - (y position)) / ((X) - (x position))))
//These next five are simple
<X position is equal to ((X) :: #00c290) :: #00c290> :: control hat
if <(x position) = (X)> then
report <<true⠀(:: #dedede) :: #23ed21> :: operators> :: control cap
else
report <<(:: #dedede)⠀false:: #c90c0c> :: operators> :: control cap
end
<Y position is equal to ((Y) :: #00c290) :: #00c290> :: control hat
if <(y position) = (Y)> then
report <<true⠀(:: #dedede) :: #23ed21> :: operators> :: control cap
else
report <<(:: #dedede)⠀false:: #c90c0c> :: operators> :: control cap
end
(previous costume :: stack #00c290) :: control hat
switch costume to ((costume #) - (1))
(((reporter) :: #00c290) reporter :: #00c290) :: control hat
report (reporter) :: control cap
<((input) :: #00c290) boolean :: #00c290> :: control hat
report (input) :: control cap
//And finally, the last one.
(draw shape with ((sides) :: #00c290) sides and a length of ((length):: #00c290) :: stack #00c290) :: control hat
set [percentage done v] to [0]
show variable [percentage done v]
pen down
repeat (sides)
change [percentage done v] by ((100) / (sides))
move ((length) * (2.5)) steps
turn @turnLeft ((360) / (sides)) degrees
end
pen up
wait (0.2) seconds
hide variable [percentage done v]
Signature in the style of an Acrostic Poem
Scripture
Inanimate
Great way to introduce yourself
Nice
Anything
Typing limit
Useful
Ranked “Scratcher”
Enabled features
- ahfjsjdkgjagddailies
- New Scratcher
2 posts
Official [scratchblocks] Testing Topic 4
move (2) steps
say [hello!]
rest for (3) beats
when backdrop switches to [hi v]
if <(pick random (1) to (10)) > [5]> then
pen up
end
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
else
end
else
end
else
end
else
end
else
end
else
end
else
end
else
end
else
end
else
yeah you can question this all you want
Last edited by skidhi (Jan. 22, 2022 14:22:47)
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
if <> then
if <> then
if <> then
if <> then
if <> then
if <> then
if <> then
if <> then
if <> then
else
end
else
end
else
end
else
end
else
end
else
end
else
end
else
end
else
end
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
<test>
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
set pen color to [if <> then
end]
broadcast [<[17] = [17]> v]
Last edited by skidhi (Jan. 22, 2022 14:25:52)
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
when green flag clicked
end
wait until <()>
else
else
(mouse down?)
<mouse down?>
<distance to [ v]>
if <distance to [ v]> then
end
([] = [])
<() + (0)>
if <([] = []) + (0)> then
end
<x position>
(not <>)
<not ()>
(<> and <>)
Last edited by skidhi (Jan. 22, 2022 14:47:37)
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- bingula
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
when [children v] get [infected v] by [the v] [Cocomelon] [zombification v] :: hat events
make a cult of [stopping Cocomelon] :: #000000
Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras. Watch out for the Gummy Bear album in stores on November 13th, with lots of music, videos, and extras.
- itsoutchy
- Scratcher
29 posts
Official [scratchblocks] Testing Topic 4
when [script is run v]
add extension [serious dev blocks v]
print text [press any key to continue] in font [graffiti v]
forever if <pen down?>
change X by [5]
report [last X position v] to [last X v]
end
when [user types v]
play game and print countdown from [5]
print text [GO!] in font [pick random v]
forever if <(device) = [mobile]>
use [mobile v] mode
———————————————————————————————————————————————————
my website | fake window experiment | html helper
———————————————————————————————————————————————————
hi! im a guy trying to get a career in game development/programming
define itsoutchy(i have made lots of games and projects)
tell [reader v] [i am willing to help people make games] :: sensing
tell [reader v] [because teamwork makes the dream work!] :: sensing
forever
tell [reader v] [have fun!] :: sensing
end
ask [have you read my signature?] and wait
if <(answer)=[yes]> then
tell [reader v] [thank you] :: sensing
tell [reader v] [i hope your projects go well!] :: sensing
end
ask [can you look at my stuff?] and wait
forever if <(answer)=[yes]> :: control
tell [reader v] [thanks!] :: sensing
end
when [reader v] answers :: control hat
forever if <[reader v] says [i like this profile v]> :: control
print [yay] :: sensing
play video [credits v] and wait :: sensing
show message box [enjoy!]
end
function [show message box] (input) :: hat
get library[system v] :: control
do function [message box v] from library [system v] with parameters [message v] as (input) :: control
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
<volume>
(item <volume> of [list v] :: list)
<backdrop name>
(video <x position> on (backdrop #))
<timer> and <timer>
<pick random <> to <>>
([ v] contains [thing] ?)
if () then
end
else
(key (<x position> of [Sprite1 v]) pressed?)
rest for <y position> beats
wait until ()
wait <> secs
end
Last edited by skidhi (Jan. 22, 2022 15:13:00)
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
<volume>
(item <volume> of [list v] :: list)
<backdrop name>
(video <x position> on (backdrop #))
<timer> and <timer>
<pick random <> to <>>
([ v] contains [thing] ?)
if () then
end
else
(key (<x position> of [Sprite1 v]) pressed?)
rest for <y position> beats
wait until ()
wait <> secs
end
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
<direction>I really tried to make the false block from Snap:
if <direction> then
<loudness>
end
stop <>
<false>reason some people dont know how to use <> or <>
(<> or <>)
<() or ()>
<[1 + 1 = 2 v] or [1 + 1 = 2 v]>here we go again…
set pen color to ((<volume> + <volume>) / (2)
<answer>
stop [all but not this script v]
if <false> then
say<[1 + 1 = 2 v] or [1 + 1 = 2 v]>
stop ( v)
(answer)
end
if <> then
end
else
if <> then
else
end
end
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- skidhi
- Scratcher
100+ posts
Official [scratchblocks] Testing Topic 4
()
standard model of particle physics
(u :: #8800ff) (c :: #8800ff) (t :: #8800ff) (g :: #ff0000) (H :: #fd0) :: stack #ffffff
(d :: #8800ff) (s :: #8800ff) (b :: #8800ff) (γ :: #ff0000) :: stack #ffffff
(e :: #77ff00) (μ :: #77ff00) (τ :: #77ff00) (W :: #ff0000) :: stack #ffffff
(νe :: #77ff00) (νμ :: #77ff00) (ντ :: #77ff00) (Z :: #ff0000) :: stack #ffffff
- Discussion Forums
- » Help with Scripts
- » Official [scratchblocks] Testing Topic 4