Spaces:
Sleeping
Sleeping
| { | |
| "block_category": "Cap Blocks", | |
| "description": "Cap blocks have a notch at the top and a flat bottom. They signify the end of a script, preventing any further blocks from being placed below them, and are used to terminate scripts or specific actions.", | |
| "blocks": [ | |
| { | |
| "block_name": "stop [v]", | |
| "block_type": "Control", | |
| "block_shape": "Cap Block (dynamic: can be Stack)", | |
| "op_code": "control_stop", | |
| "functionality": "Halts all scripts, only the current script, or other scripts within the same sprite. Its shape can dynamically change based on the selected option.", | |
| "inputs": [ | |
| {"name": "option", "type": "dropdown", "options": ["all"]} | |
| ], | |
| "example_standalone": "stop [all v]", | |
| "example_with_other_blocks": [ | |
| { | |
| "script": "if <(health) = (0)> then\n stop [all v]\nend", | |
| "explanation": "This script stops all running scripts in the project if the 'health' variable reaches 0, typically signifying a game over condition. [9, 15]" | |
| } | |
| ] | |
| }, | |
| { | |
| "block_name": "delete this clone", | |
| "block_type": "Control", | |
| "block_shape": "Cap Block", | |
| "op_code": "control_delete_this_clone", | |
| "functionality": "Removes the clone that is executing it from the stage.", | |
| "inputs":null, | |
| "example_standalone": "delete this clone", | |
| "example_with_other_blocks": [ | |
| { | |
| "script": "when I start as a clone\n wait until <touching [edge v]?>\n delete this clone\nend", | |
| "explanation": "This script, run by a clone, causes the clone to disappear from the stage once it touches the edge. [1]" | |
| } | |
| ] | |
| }, | |
| { | |
| "block_name": "forever", | |
| "block_type": "Control", | |
| "block_shape": "Cap Block", | |
| "op_code": "control_forever", | |
| "functionality": "Continuously runs the blocks inside it.", | |
| "inputs": null, | |
| "example_standalone": "forever", | |
| "example_with_other_blocks": [ | |
| { | |
| "script": "when green flag clicked\n forever\n move (5) steps\n if on edge, bounce\n end", | |
| "explanation": "This script makes the sprite move endlessly and bounce off the edges of the stage, creating continuous motion." | |
| } | |
| ] | |
| } | |
| ] | |
| } |