Skip to content

3.1.3.8 Variables

Variable blocks are used to create and store dynamic data, such as scores, counts, or text information. Users can record and pass data within a program by setting or modifying the contents of these variables.

blocks Note
image Create a new variable and set its scope.
image Retrieve the value of the variable "my variable"; check this box to display the value on the stage.
image Set the value of the variable my variable to 0.
image Increment the variable my variable by 0.
image Display the variable "my variable" on stage.
image Hide the variable my variable in the scope.
image Create a new list and set a name for it; the name cannot be left blank.
image Set the list name here to "Basketball Machine," and check the "List: Basketball Machine" box in the command area to display it on the stage.
image Add a new list item named "thing."
image Delete the first item from the "Shooting Machine" list.
image Delete all items from the "Shooting Machine" list.
image Enter 1 in the first field of "Shooting Machine"; you can modify any of the specific values.
image Replace the first entry in "Shooting Machine" with 1; all other values can be modified.
image Retrieve the first item from the "Shooting Machine" list.
image Get the ID of the first "item" in the "Shooting Machine" list. 
image Get the ID of the first "item" in the "Shooting Machine" list.
image Determine whether the "Shooting Machine" list contains "thing."
image Show or hide the "Shooting Machine" list.