-
Notifications
You must be signed in to change notification settings - Fork 0
bsl
bsl (backslash script) is a programming language made by me :3 for making backslash projects
it is inspired by c like programming languages such as javascript, javascript and javascript
in backslash every* block needs to be included first
the inclde format looks like this
#include <"INCLUDETYPE" "PATH/URL">
example:
#include <"blocks/js" "tw-blocks/blocks_vertical/control.js">
this will include the control category from turbowarp
but what if you dont want to include every single category from scratch, thats why i made base.js!
just add this to your code
#include <"blocks/js" "base.js">
and all scratch blocks will be included in your code
hat blocks are the start of execution in scratch, blocks like when greenflag clicked
, when i receive [v event]
and such
the sytax for them looks like this:
event_whenflagclicked() {
// ...
}
but what if you dont want to type all that for just a simple when greenflag clicked
, thats why i added gf {}
instead of doing all that just add this
gf {
// ...
}
reporters are the basic, everyday blocks, like move (steps) steps
the syntax for them is like calling a function in most programming languages
OPCODE(ARG1, ARG2, ...)
for example:
motion_gotoxy(5, 5)
opcodes are usually similar to the block's name in the editor but they can be different, that's why i recommend using the bsl VSCode extension
branch blocks (eg. if, ifelse) are like reporters but they also have branch inputs that you can put blocks in
the syntax is also fairly simple
OPCODE(ARG1, ARG2, ...) {
// ...
}
for example:
control_if(true) {
// ...
}
if there are more branches just add them after
example:
control_if_else(false) {
// ...
} {
// ...
}