File size: 2,314 Bytes
3abfe5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  "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."
        }
      ]
    }
  ]
}