Im used to coding in python. How do I create a function that contains code?

For context I have a Finch Robot that I can code with Snap! I am making a game similar to the Simon memory game (google it if you haven't heard of it)

I am trying to make a function that will make the Finch robot play a sound and show some lights. I need to be able to put the function into a list. Problem is Im not too familiar with Snap! and I dont know how to do that.

Hi! Welcome to Snap!.

The way to use a function as data is to enclose it in a gray ring:
untitled script pic (2) untitled script pic (3)
There are lots of ways to ringify a script. Probably the easiest is to right-click on it and choose "ringify" from the menu. Once you've done that, you can put the ringified script into a LIST block:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.