Code compiler for roblox game Cat Web The game uses a block-based coding language. Luckly its possible to import code via json so I've made this compiler which coverts a basic text based language into cat web's json format.
log(message: string);Prints white textwarn(message: string);Prints orange texterror(message: string);Prints red text
wait(seconds: number);Waitssecondssecondsredirect(url: string);Redirects user tourl
play(audio_id: number);Plays audio with ididplay_l(audio_id: number);Plays audio with ididon loopvolume(volume: number);Sets global volume tovolumestopall();Stops all playing audiopauseall();Pauses all playing audioresumeall();Resumes any paused audio
hide(id: number);Hides element with global idid<show(id: number);Shows element with global ididconfigure(property: string, id: number, value: any);Sets propertypropertytovalueon element with global idid
Loop forever
loop {
log("hi");
}
Loop n times
loop(n: number) {
log("hi");
}
Variable support is still in progress however the basics work.
x = 10;Create variablexwith value10y = x + 2;Create variableywith value as result of expressionx + 2(Support for longer expressions not implemented yet)log("{x}");Log variablexto console. Support forlog(x);not implemented yet.log("The value of x is: {x}");String works!
//for single line comments/* */for multi line comments
- There is a limit of 500 actions per second.
wait(seconds: number)can be used to slow down your code to stay below this limit. - The developer of cat web has incorrectly utilized the roblox filter resulting in very harsh code tagging.
- Variables
- Conditionals
- Code Triggers (Loaded, key press, etc)
- Loops
- Functions (Cat web doesn't have functions, this will be a compiler time macro-like thing)