Skip to content

Instantly share code, notes, and snippets.

@FAReTek1
Last active February 23, 2025 15:43
Show Gist options
  • Save FAReTek1/4519a838fce921769a9d86c2b2a35c95 to your computer and use it in GitHub Desktop.
Save FAReTek1/4519a838fce921769a9d86c2b2a35c95 to your computer and use it in GitHub Desktop.
Hopefully comprehensive list of all commands that should work with the hypothetical '@' syntax in goboscript
@.direction += 15;
@.direction -= 15;
# *=, /=, //=, %= would need to use point in direction block
# that would be a lot of implementations, considering all the different attributes, so there is abstraction needed here
@.direction = 90;
goto @gobo;
glide 1, @gobo;
point_towards @gobo;
@.x += 10;
@.x = 0;
@.y += 10;
@.y = 10;
@.x
@.y
@.direction
@.costume_number = 10;
@.costume_number++; # next costume
# these would need to use the switch costume block
# in fact, if a js/json number is passed into that block, it uses costume number
# so it can work reliably, even with costumes called '1', since that would be switched to when passing in a string
@.costume_number = 10; # this means that the input here will need to be casted to a number. this can be done just by adding 0
@.costume_name = "gobo"; # these would need to be casted to strings, which can be done by joining an empty string
@.costume_name &= "2"; # this is a command which should only do stuff when there is a costume called 'gobo2'.
# if the costume is now "1":
@.costume_name += 2; # this would try to change the costume to the one called '3', if there is one
@stage.backdrop_number++; # this is harder to write than the current command
# but you could use this syntax to change multiple backdrops at once
@stage.backdrop_number += 3;
@stage.backdrop_name = "stars";
@stage.backdrop_name &= " zoomed in";
@.costume_number
@.costume_name
@stage.backdrop_number; # this is harder to write
@stage.backdrop_name # with code completion it isn't *that* bad, but still
@.size
@.size = 100;
@.size += 12;
@.volume
@.volume = 100;
@.volume += -10;
create_clone @gobo; # if you use just @ here it doesn't actually need to convert to _myself_
touching(@gobo)
distance_to(@gobo)
@gobo.x/y/direction/size/costume_number/costume_name/size/volume/<for-this-sprite variables>
@stage.backdrop_number/backdrop_name/volume/<for-all-sprites variables - this exists but is pretty useless>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment