We seem to be getting a lot of spam posts from people new to the forums trying out the Scratchblock feature. Maybe if we had a dedicated place for playing around with them, we could cut down on that some.
So here it is - try out your script displaying skills here!
However, please do not turn this into a spam area. Post until you are comfortable with the Scratchblock syntax and then stop. Don't make ongoing stories or conversations here.
Last edited by Paddle2See (2012-03-25 08:54:37)
Offline
A play area. :DDD
I've been meaning to test some more....
When Green Flag clicked :D
Last edited by CheeseMunchy (2012-02-21 14:35:29)
Offline
< <(variable1) > [5]> or <(variable1) = [5]> >
< <(variable1) > [5]> or <(variable1) = [5]> >huh, this didn't work earlier...came up with some some weird text on a block.
Last edited by Smozzick (2012-02-21 14:25:35)
Offline
There is already a place for this. I'll find the link.
EDIT: oops, paddle made this.
Last edited by samtwheels (2012-02-21 16:21:28)
Offline
when gf clicked forever say [oops!] end say [sorry paddle]
Last edited by samtwheels (2012-02-21 16:22:46)
Offline
samtwheels wrote:
There is already a place for this. I'll find the link.
EDIT: oops, paddle made this.
Actually, you're right about there being another place for this.
This page is officially advertised in the Announcements thread by JSO, and doesn't actually spam up the forums in any way!
Offline
when I receive [Thread has been posted v] say [Yay, a play area :DDDDDDDDDDDDDDD]
Offline
samtwheels wrote:
There is already a place for this. I'll find the link.
EDIT: oops, paddle made this.
There is? I know about JSO's plugin lab:
http://joren.tk/blocks/pluginlab.htm
but it seems to be a bit slow to respond and a lot of people seem to be missing it. I thought I'd try this approach and see how it worked out
Offline
You can get a relatively good approximation by writing the project summary (shift-click File).
when green flag clicked point in direction 90 set "PlayerX" to "0" set "PlayerY" to "0" set "LevelNumber" to "1" set "Dir" to "0" set "Xvel" to "0" set "Yvel" to "0" forever clear go to x: 0 y: 0 switch to costume ((LevelNumber) + 1) stamp switch to costume "Marble" if ((Dir) = "0") else go to x: ((PlayerX) * 30) y: ((PlayerY) * 30) else if ((Dir) = "1") else go to x: ((PlayerY) * 30) y: ((PlayerX) * -30) else if ((Dir) = "2") else go to x: ((PlayerX) * -30) y: ((PlayerY) * -30) else go to x: ((PlayerY) * -30) y: ((PlayerX) * 30) stamp if (key "right arrow" pressed?) switch to costume ((LevelNumber) + 1) go to x: 0 y: 0 clear set "Dir" to (((Dir) + 1) mod 4) set "PlayerX" to (round (PlayerX)) set "PlayerY" to (round (PlayerY)) repeat 10 turn 9 degrees if (key "left arrow" pressed?) switch to costume ((LevelNumber) + 1) go to x: 0 y: 0 clear set "Dir" to (((Dir) - 1) mod 4) set "PlayerX" to (round (PlayerX)) set "PlayerY" to (round (PlayerY)) repeat 10 turn -9 degrees if (((Dir) = "0") and ("0" = (letter ((((round (PlayerX)) + 0) + 4) + ((((round ((PlayerY) + 0.5)) + -1) - 3) * -7)) of (item (LevelNumber) of "LevelData" )))) change "PlayerY" by -0.1 if (((Dir) = "1") and ("0" = (letter ((((round ((PlayerX) - 0.5)) + 1) + 4) + ((((round ((PlayerY) + 0.5)) + 0) - 3) * -7)) of (item (LevelNumber) of "LevelData" )))) change "PlayerX" by 0.1 if (((Dir) = "2") and ("0" = (letter ((((round (PlayerX)) + 0) + 4) + ((((round ((PlayerY) - 0.5)) + 1) - 3) * -7)) of (item (LevelNumber) of "LevelData" )))) change "PlayerY" by 0.1 if (((Dir) = "3") and ("0" = (letter ((((round ((PlayerX) + 0.5)) + -1) + 4) + ((((round ((PlayerY) - 0.5)) + 0) - 3) * -7)) of (item (LevelNumber) of "LevelData" )))) change "PlayerX" by -0.1 end
Offline
CheeseMunchy wrote:
(TestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesv)
(Lololololololololololololololololololololololololololololololololololololololololololololololololol)
Offline
RedRocker227 wrote:
CheeseMunchy wrote:
(TestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesv)(Lololololololololololololololololololololololololololololololololololololololololololololololololol)
when gf clicked say [all aboard quote train!] play sound[choo-choo] // :P
Offline
Hardmath123 wrote:
You can get a relatively good approximation by writing the project summary (shift-click File).
Good point! I didn't know that. This tip really helps if you don't want to type everything out word for word. You just have to fix some syntax problems. Here is the script for the "ball" sprite in the Sample Project "5 MarbleRacer".
This is what it looks like when I first copy and paste the script.
when green flag clicked forever if (key "up arrow" pressed?) change "y velocity" by 0.02 if (key "down arrow" pressed?) change "y velocity" by -0.02 if (key "left arrow" pressed?) change "x velocity" by -0.02 if (key "right arrow" pressed?) change "x velocity" by 0.02 end when green flag clicked forever change x by (x velocity) change y by (y velocity) end when green flag clicked set "x velocity" to 0 set "y velocity" to 0 go to x: 183 y: -6 end when green flag clicked forever if (touching color c[00CC44]?) set "x velocity" to ((x velocity) * 0.95) set "y velocity" to ((y velocity) * 0.95) end
This is what it looks like when I fix it:
when green flag clicked forever if (key [up arrow v] pressed?) change [y velocity v] by [0.02] end if (key [down arrow v] pressed?) change [y velocity v] by [-0.02] end if (key [left arrow v] pressed?) change [x velocity v] by [-0.02] end if (key [right arrow v] pressed?) change [x velocity v] by [0.02] end when green flag clicked forever change x by (x velocity) change y by (y velocity) when green flag clicked set [x velocity v] to [0] set [y velocity v] to [0] go to x: (183) y: (-6) when green flag clicked forever if (touching color [#00CC44]?) set [x velocity v] to ((x velocity) * (0.95)) set [y velocity v] to ((y velocity) * (0.95))
The first one still get's the point across, but the second one improves upon the syntax so the script looks more accurate.
Offline
Ooohhh, these posts gave me an idea... project summary to scratchblocks parser!!
Offline
People could just click preview to test around, but this will be good for the people who didn't think about that.
Offline
RedRocker227 wrote:
CheeseMunchy wrote:
(TestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesv)(Lololololololololololololololololololololololololololololololololololololololololololololololololol)
lol you can't scroll sideways
Offline
muppetds wrote:
RedRocker227 wrote:
CheeseMunchy wrote:
(TestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesTestingtestpicklesv)(Lololololololololololololololololololololololololololololololololololololololololololololololololol)lol you can't scroll sideways
when I receive [Extremely good point v] play sound [Grunt v] say [Y U NO TALK IN SCRATCH BLOCKS?]
Offline
Hardmath123 wrote:
You can get a relatively good approximation by writing the project summary (shift-click File).
when green flag clicked point in direction (90) set [PlayerX v] to (0) set [PlayerY v] to (0) set [LevelNumber v] to (1) set [Dir v] to (0) set [Xvel v] to (0) set [Yvel v] to (0) forever clear go to x: (0) y: (0) switch to costume ((LevelNumber)+(1)) stamp switch to costume [Marble v] if <(Dir)=(0)> go to x: ((PlayerX)*(30)) y: ((PlayerY)*(30)) else if <(Dir)=(1)> go to x: ((PlayerY)*(30)) y: ((PlayerX)*(-30)) else if <(Dir)=(2)> go to x: ((PlayerX)*(-30)) y: ((PlayerY)*(-30)) else go to x: ((PlayerY)*(-30)) y: ((PlayerX)*(30)) stamp if <key [right arrow v] pressed?> switch to costume ((LevelNumber)+(1)) go to x: (0) y: (0) clear set [Dir v] to (((Dir)+(1)) mod (4)) set [PlayerX v] to (round (PlayerX)) set [PlayerY v] to (round (PlayerY)) repeat (10) turn ccw (9) degrees if <key [left arrow v] pressed?> switch to costume ((LevelNumber)+(1)) go to x: (0) y: (0) clear set [Dir v] to (((Dir)-(1)) mod (4)) set [PlayerX v] to (round (PlayerX)) set [PlayerY v] to (round (PlayerY)) repeat (10) turn ccw (-9) degrees if <<(Dir)=(0)> and <(0)=(letter((((round (PlayerX))+(0))+(4))+((((round ((PlayerY)+(0.5)))+ (-1))-(3))*(-7))) of (item (LevelNumber) of [LevelData v]))>> change [PlayerY v] by (-0.1) if <<(Dir)=(1)> and <(0)=(letter((((round ((PlayerX)-(0.5)))+(1))+(4))+((((round ((PlayerY)+(0.5)))+(0))-(3))*(-7))) of (item (LevelNumber) of [LevelData v]))>> change [PlayerX v] by (0.1) if <<(Dir)=(2)> and <(0)=(letter((((round (PlayerX))+(0))+(4))+((((round ((PlayerY)-(0.5)))+(1)) -(3))*(-7))) of (item (LevelNumber) of [LevelData v]))>> change [PlayerY v] by (0.1) if <<(Dir)=(3)> and <(0)=(letter((((round ((PlayerX)+0.5))+(-1))+(4))+((((round ((PlayerY)-(0.5)))+(0))-(3))*(-7))) of (item (LevelNumber) of [LevelData v]))>> change [PlayerX v] by (-0.1) end
Fixed.
Last edited by mitchboy (2012-02-23 17:01:18)
Offline
when i receive [lunch Time!] Set [Size of pickle v] to [100] Open [oven v] Grab [pickle v] pull up [chair v] wait [3] secs repeat until <(Size of pickle) = [0]> [Chew v] for [3] secs Change [Size of pickle v] by [-1] wait [1] secs say [ew this is nasty] for [2] secs
Last edited by CheeseMunchy (2012-02-23 17:00:32)
Offline
LS97 wrote:
Ooohhh, these posts gave me an idea... project summary to scratchblocks parser!!
Taht's why this used to be in Advanced Topics—that was my goal.
Offline
Hardmath123 wrote:
LS97 wrote:
Ooohhh, these posts gave me an idea... project summary to scratchblocks parser!!
Taht's why this used to be in Advanced Topics—that was my goal.
And what stopped you from achieving it?
Offline
Let me test... I might find a bug.
Test 1 No bugs in main subject. +0
[b] when gf clicked say [lol] for [u] secs[/b][/u]
when gf clicked say [b] for [i] secs[/b][/i]
// testing say [huh]Test 3 No bugs! Achievement! No BBcode mess! (+2)
say [hehe] // [b] test [/b]Test 4 No bugs! +1
say [MESS!!!!]
say [[b]] for [[haha]] secs[/b]
go to [test v] set x to (var) set x to [haha] [/b]
when gf clicked sayfor (haha) secs
go to [test twice v] set x to (variable) set x to [haha twice]
forever say (length of [bugs v]) for (2) secs // which is 2... set [Current Rating v] to (((10) - (length of [bugs v])) + (length of [achievements v])) say (Current Rating) // which is 12 out of 10
Last edited by rdococ (2012-02-24 15:09:35)
Offline
CheeseMunchy wrote:
when i receive [lunch Time! v] Set [Size of pickle v] to [100] Open [oven v] Grab [pickle v] pull up [chair v] wait [3] secs repeat until <(Size of pickle) = [0]> [Chew v] for [3] secs Change [Size of pickle v] by [-1] wait [1] secs say [ew this is nasty] for [2] secs end broadcast [lunch eaten v]
when i receive [lunch eaten v] say [LOLOLOLOLOLOLOL] for [a lot] secs
Offline