How do functions work?

You can essentially make a custom block
Example: I’m trying to add custom emotion animations
image


Now the text inputted in the function is sent to the bottom line
this just stores it on the sprite

Finally, the data is read in this if statement and the sprite animates
image
This is useful for repeating the same action - displaying an emoji on a sprite
but also making it able to be used for multiple different emoji types

Example 2: moving a sprite


Can edit the number of times the sprite moves, the amount it moves by, and the pause between each move repeat (can add even more if you want to customise further)
This is useful for making custom movement with only 1 function (less blocks)
also makes it easier to edit the code as changes affect all 4

2 Likes