Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Official [scratchblocks] Testing Topic 6
- someones_______alt
-
14 posts
Official [scratchblocks] Testing Topic 6
yesAre you trying to do this:when green flag clicked
forever
if <> then
<(score) > (highscore)>
end
endset [(highscore) v] to (score)
this isn't working for some reason, any idea why?when green flag clicked
forever
if <(score) > (☁ highscore)> then
set [☁ highscore v] to (score)
end
endwhen green flag clicked
forever
if <(score) > (☁ score)> then
set [☁ highscore v] to (score)
end
end
- SunnySmallCrisps
-
3 posts
Official [scratchblocks] Testing Topic 6
when green flag clicked
forever
play sound [happy sound]
end
- kingslime140
-
94 posts
Official [scratchblocks] Testing Topic 6
activate @greenFlag [auto v]::hat- automaticly activates the green flag
Do [crash v]::cap- for trolling
if <not <(OriginalScripts) = (OriginalScripts)>> then- if someone edited code
...
end
create clone of [_THIS v] at X: [0], Y: [0]- creates clone at a position
all at once {
...
}
- Dankiel_
-
100+ posts
Official [scratchblocks] Testing Topic 6
what doesdefine check if between (x) (x2) and (y) (y2) check (cx) (cy) speed (speed)mean for game? send game link
set [solid v] to ((99) * <<<<(cy::custom) \> (y::custom)> and <(cy::custom) \< (y2::custom)>> or <<(y2::custom) = (y::custom)> and <([abs v] of ((cy::custom) - (y::custom))::operators) \< (speed::custom)>>> and <<<(cx::custom) \> (x::custom)> and <(cx::custom) \< (x2::custom)>> or <<(x2::custom) = (x::custom)> and <([abs v] of ((cx::custom) - (x::custom))::operators) \< (speed::custom)>>>>)
define collision (x) (y) (radius) (speed)
set [i v] to [1]
repeat ((length of [COLLISIONS v]::data) / (2))
set [solid v] to [0]
delete all of [VALUES v]
get values [_] (item (i) of [COLLISIONS v])::custom
get values [_] (item ((i) + (1)) of [COLLISIONS v])::custom
hitbox ((x::custom) + (radius::custom)) (y::custom) (speed::custom)::custom
hitbox (x::custom) ((y::custom) + (radius::custom)) (speed::custom)::custom
hitbox ((x::custom) - (radius::custom)) (y::custom) (speed::custom)::custom
hitbox (x::custom) ((y::custom) - (radius::custom)) (speed::custom)::custom
hitbox ((x::custom) + (radius::custom)) ((y::custom) + (radius::custom)) (speed::custom)::custom
hitbox ((x::custom) + (radius::custom)) ((y::custom) - (radius::custom)) (speed::custom)::custom
hitbox ((x::custom) - (radius::custom)) ((y::custom) + (radius::custom)) (speed::custom)::custom
hitbox ((x::custom) - (radius::custom)) ((y::custom) - (radius::custom)) (speed::custom)::custom
hitbox (x::custom) (y::custom) (speed::custom)::custom
if <(solid) = [99]> then
stop [this script v]
end
change [i v] by (2)
end
define get values (delimeter) (code)
set [o v] to [0]
repeat (length of (code::custom)::operators)
set [data v] to []
change [o v] by (1)
repeat until <(letter (o) of (code::custom)) = (delimeter::custom)>
set [data v] to (join (data) (letter (o) of (code::custom)))
change [o v] by (1)
if <(o) \> (length of (code::custom)::operators)> then
stop [this script v]
end
end
add (data) to [VALUES v]
end
Pen collision thing
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/699833529/
- dascoolguy-
-
66 posts
Official [scratchblocks] Testing Topic 6
fixed:forever if <(50) = (50)>
display [ v]
forever if <(50) = (50)> ::control
display [ v] ::looks
- RedReadyOPERA
-
100+ posts
Official [scratchblocks] Testing Topic 6
(#5078)Are You Trying To Do:when green flag clicked
forever
if <(score) > (highscore)>thenset [(highscore) v] to (score)
this isn't working for some reason, any idea why?
when green flag clicked
forever
if <(score) > (☁ highscore)>then
set [☁ highscore v] to (score)
Last edited by RedReadyOPERA (Jan. 4, 2023 08:54:48)
- fffggheeegehd
-
100+ posts
Official [scratchblocks] Testing Topic 6
when green flag clicked
forever if <I see ANY channel on youtube related to TDC Funkin::grey>{die::grey}@loopArrow::control cap
- fffggheeegehd
-
100+ posts
Official [scratchblocks] Testing Topic 6
(#5085)Wait (2000) years
//correction
wait (200) [years v] :: control
- newSUPERMARIOTRASH
-
500+ posts
Official [scratchblocks] Testing Topic 6
HOLY BOLOGNA((((((((((((((((()))))))))))))))))
- newSUPERMARIOTRASH
-
500+ posts
Official [scratchblocks] Testing Topic 6
I WILL PLAY SOME MC(#5085)Wait (2000) years//correction
wait (200) [years v] :: control
run ({Minecraft }@addInput) for (200) [years v]
- newSUPERMARIOTRASH
-
500+ posts
Official [scratchblocks] Testing Topic 6
How did you manage to do that(#5078)Are You Trying To Do:when green flag clicked
forever
if <(score) > (highscore)>thenset [(highscore) v] to (score)
this isn't working for some reason, any idea why?This?
when green flag clicked
forever
if <(score) > (☁ highscore)>then
set [☁ highscore v] to (score)
- RedReadyOPERA
-
100+ posts
Official [scratchblocks] Testing Topic 6
(#5091)SCRATCHBLOCKS HOMEPAGEHow did you manage to do that(#5078)Are You Trying To Do:when green flag clicked
forever
if <(score) > (highscore)>thenset [(highscore) v] to (score)
this isn't working for some reason, any idea why?This?
when green flag clicked
forever
if <(score) > (☁ highscore)>then
set [☁ highscore v] to (score)
- medians
-
1000+ posts
Official [scratchblocks] Testing Topic 6
Correction:(#5090)I WILL PLAY SOME MC(#5085)Wait (2000) years//correction
wait (200) [years v] :: controlrun ({Minecraft }@addInput) for (200) [years v]// Correction:
run ({Minecraft ::operators }@addInput) for (200) [years v] ::control
when green flag clicked
set [advanced v] to [true]
plaque
forever
set [color v] effect to (25)
end
define plaque
set [teeth condition v] to [bad]
- StefanMIX
-
100+ posts
Official [scratchblocks] Testing Topic 6
@greenFlag :: #f4f4f4
the f4f colour @greenFlag
this is a chain where you add colours :: #000000
- edw323e
-
1 post
Official [scratchblocks] Testing Topic 6
hhhhhhh@greenFlag :: #f4f4f4
the f4f colour @greenFlag
this is a chain where you add colours :: #000000
- RedReadyOPERA
-
100+ posts
Official [scratchblocks] Testing Topic 6
(#5094)stopCorrection:(#5090)I WILL PLAY SOME MC(#5085)Wait (2000) years//correction
wait (200) [years v] :: controlrun ({Minecraft }@addInput) for (200) [years v]// Correction:when green flag clicked
set [advanced v] to [true]
plaque
forever
set [color v] effect to (25)
end
define plaque
set [teeth condition v] to [bad]
- theofariap
-
5 posts
Official [scratchblocks] Testing Topic 6
when green flag clicked
stamp
when green flag clicked
if <touching color [#99999] ?> then
say [Olá pessoal] for (2) secs
else
move (até uma pessoa) steps
end
when backdrop switches to [xadrez]
execute o xadrez
define todos os blocos
Last edited by theofariap (Jan. 4, 2023 22:19:33)
- ericplays2021
-
58 posts
Official [scratchblocks] Testing Topic 6
simple image export script:
//(sry for that broken one i was using scratchblocks3 instead of scratchblocks2 to view my work.)
:: // make sure you turn on "run without screen refresh"
define render
set [BIN v] to []
repeat until <(y position) > (179)>
repeat until <(x position) > (239)>
set [BIN v] to (<touching color [#000000] ?> mod (2))
change x by (1)
end
go to x: (-240) y: ((y position) + (1)) :: // i put it there so it reads the entire screen
end
Last edited by ericplays2021 (Jan. 4, 2023 23:14:06)