I want scratch 2.0 to use a coding language I used a bit of Java and Lua to make this language
download the text doc here: http://www.mediafire.com/?7kfp2xcobd68w7z
or look here V
Motion
move () steps: moveSteps()
turn90 : turnClockWise()
turn-90 : turnAntiClockWise()
Point in Direction: pointDir()
PointTowards: pointTo()
gotoXY: goto(x, y)
glide to xy: glideTo(x,y)
Change x by(): changeX()
Set x to (): setX()
Change y by(): changey()
Set y to (): sety()
If on edge Bounce: ifOnEdgeBounce
x Position \
x Position --- Can be used as a varible
Direction /}
Control
When flag clicked: onFlagClick{
Code Goes Here
}
When (key) pressed: onKeyPress(){
Code Goes Here
}
When Sprite clicked: on(SpriteName)Clicked{
Code Goes Here
}
Wait () Secs: Wait()
forever: Forever{
Code Goes Here
}
repeat(): Repeat(){
Code Goes Here
}
broadcast(): Broadcast()
broacast () and wait: broadcastWithWait()
When i receive(): on()Recive{
Code Goes Here
}
Forever If(): foreverIf(){
Code Goes Here
}
if(): if(){
Code Goes Here
}
else if: if(){
Code
}else {
Other Code
}
Wait Until: waitFor()
Repeat Until: repeatUntil{
Code Goes Here
}
Stop Script: end //Put end at the end of the code btw // Will be a comment
Stop All: stopAll
Looks
Switch To Costume(): changeTexture(nameOfCostume)
Next Costume: changeTexture(costume++) //The ++ WIll mean add one and -- will take away one
Costume#: costume
say() for (): Print("Text", time)
say(): Print("Text")
Think() for (): think("Text", time)
Think(): think()
Change () effect by: effect.change()By()
Set () effect to(): effect.set()To()
Clear Graphic Effects: effect.clear
Change Size By(): sizeSet(size + ())
Set Size To (): sizeSet()
[]Size: size //To check do size.show
show: show
hide: hide
Go To Front: goToFront
Go Back () Layers: layersBack()
Sensing
touching (): isTouching()
Touching Color (): isTouchingColor()
Ask (): ask("TEXT")
answer: Getanswer
mouse x: getMouseX
mouse y: getMouseY
Mouse Down?: isMouseDown
Key () Pressed: isKey()Pressed
Distance To (): getDistanceTo()
reset timer: timer.reset
timer: getTimer or timer.value
() of (): get()Of()
loudness: getLoud
loud?: isLoud
Sound
Play Sound(): sound.play()
Play Sound() Until Done: sound.play()UntilDone
Stop All Sounds: sound.stop
Play Drum () for () beats: sound.playDrum()For()
Rest For () Beats: sound.rest()
Play Note () for () beats: sound.playNote()For()
Set Instrument to (): sound.setInstrument()
Change Volume By(): sound.setVolume(Volume + ())
Set Volume (): sound.setVolume()
Volume: Volume
Change Tempo by (): sound.setTempo(Temp + ())
Set Tempo to (): sound.setTempo()
Tempo: Tempo
Operators
()+() \
()-() \ Are the same
()*() /
()/() /
Pick Random () to (): rand(1, 10)
()<()\
() ) |The same
()>()/
()and()\ The
()or() / Same
not(): !()
join(Hello )(world): "Hello " + "world"
Letter (1) of (world): getLetter(1)Of("World")
length of (world): getLength("world") or for a varable varName.length
()mod(): math.mod()
round(): math.round()
(sqrt) of (10): math.(sqrt, 10)
Pen
clear: pen.clear
pen down: pen.down
pen up: pen.up
set pen color: pen.setColorRGB(123,123,123)
change pen color by: pen.changeColor(10)
set pen color: color.setColor(0)
change pen shade by (10): pen.changeShade(10)
change pen shade to (50): pen.setShade(50)
change pen size by (10) pen.changeSize(10)
set pen size to (1): pen.setSize(1)
stamp: pen.stamp
Varables
I have a varable called test and a list called text
set test to (0): var.setVal(test, 0)
change test by (1): var.setVal(test, test + 1)
show variable test: var.show(test)
hide variable test: var.hide(test)
add thing to text: list.add(thing, text)
delete 1 of text: list.delete(thing, 1, text)
insert thing at 1 of text: list.addAtNumber(thing, 1 ,text)
replace item 1 of text: list.replace(1, text)
item 1 of text: list.item(1, text)
length of text: list.text.length
text contains thing: list.contains(text, thing)
Last edited by reddy360 (2012-06-26 10:28:44)
Offline
This isn't really help with scripts, it's more of a suggestion, so i'll move it there for you.
2.0 is going to remain block based programming, but you can check out M30W, a text based Scratch.
Offline
scimonster wrote:
This isn't really help with scripts, it's more of a suggestion, so i'll move it there for you.
2.0 is going to remain block based programming, but you can check out M30W, a text based Scratch.
Though, theoretically, you could decompile the .sb2, edit the JSON with a text editor, then recompile it
Though it wouldn't be as easy as text based scratch
Last edited by SJRCS_011 (2012-06-27 17:50:54)
Offline
Great idea, and it'll work quite well! But, Scratch is block-based so that it is easier to understand; Making it a text-based language kinda voids the whole thing. Like Paddle said, you should check out M30W, but Lua is also very easy. It's also easy to move on to Javascript after you've mastered Scratch.
Offline
they should put in the scratchblocks language because it's easy to figure out.
when gf clicked repeat until <(timer) > [10]> go to [mouse-pointer v] end think [Scripts in your posts!] for (3) secswhen gf clicked
Last edited by blargin (2012-08-06 08:12:25)
Offline