Text Scratch
Jump to navigation
Jump to search
Text Scratch is a textual version of Scratch by User:Hammy.
Conversion
The program can start with this:
{include
{variable (VARIABLE NAME)}
{extension (EXTENSION NAME)}
{privatevar (VARIABLE NAME) (SPRITE THAT CAN ACCESS IT)}
}
Events look like this:
[event name code here!! ]
Blocks look like this:
[block (param1) <param2>]
And this sometimes:
(reporter)
Or this:
<bool>
And that's basically it! But there's something extra: sprites.
A sprite's code looks like this:
{sprite (name)
{x = (x value)}
{y = (y value)}
{size = (size)}
{img = (image, can be scratch image or a url)}
[code
code here
]
}
If the size is omitted, it defaults to 100.
If the x and/or y are omitted, they default to 0.
If the img is omitted, it defaults to the scratch sprite "Cat". The final bit of code is outside sprite declarations, and is known as the action area.
The actions are:
start
Presses the green flag.
stop
Presses the stop symbol idk what it's called
wait
Waits until an action is needed.
click (sprite)
Clicks that sprite, activating its "when this sprite clicked" event.
Examples
Hello world
{sprite test
[code
[when green flag clicked
[say (Hello, world!) for (2) seconds]
]
]
}
start