Spaces:
Sleeping
Sleeping
File size: 58,808 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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 |
{
"block_category": "Stack Blocks",
"description": "Stack blocks are the most common block shape, featuring a notch at the top and a bump at the bottom. They perform the main commands within a script and can connect both above and below them.",
"blocks": [
{
"block_name": "move () steps",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_movesteps",
"functionality": "Moves the sprite forward by the specified number of steps in the direction it is currently facing. A positive value moves it forward, and a negative value moves it backward.",
"inputs": [
{
"name": "STEPS",
"type": "number"
}
],
"example_standalone": "move () steps",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n go to x: (0) y: (0)\n point in direction (90)\n move (50) steps\nend",
"explanation": "This script first places the sprite at the center of the stage, points it to the right (90 degrees), and then moves it 50 steps in that direction."
}
]
},
{
"block_name": "turn right () degrees",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_turnright",
"functionality": "Turns the sprite clockwise by the specified number of degrees.",
"inputs": [
{
"name": "DEGREES",
"type": "number"
}
],
"example_standalone": "turn (clockwise icon) (15) degrees",
"example_with_other_blocks": [
{
"script": "when [right arrow v] key pressed\n turn (clockwise icon) (15) degrees\nend",
"explanation": "This script makes the sprite turn clockwise by 15 degrees every time the right arrow key is pressed."
},
{
"script": "when green flag clicked\n forever\n turn (clockwise icon) (15) degrees\n wait (0.5) seconds\n end",
"explanation": "This script makes the sprite continuously spin clockwise by 15 degrees every half second."
}
]
},
{
"block_name": "turn left () degrees",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_turnleft",
"functionality": "Turns the sprite counter-clockwise by the specified number of degrees.",
"inputs": [
{
"name": "DEGREES",
"type": "number"
}
],
"example_standalone": "turn (counter-clockwise icon) (15) degrees",
"example_with_other_blocks": [
{
"script": "when [left arrow v] key pressed\n turn (counter-clockwise icon) (15) degrees\nend",
"explanation": "This script makes the sprite turn counter-clockwise by 15 degrees every time the left arrow key is pressed."
},
{
"script": "when green flag clicked\n forever\n turn (counter-clockwise icon) (15) degrees\n wait (0.5) seconds\n end\nend",
"explanation": "This script makes the sprite continuously spin counter-clockwise by 15 degrees every half second."
}
]
},
{
"block_name": "go to ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_goto",
"functionality": "Moves the sprite to a specified location, which can be a random position, the mouse pointer, or another sprite.",
"inputs": [
{
"name": "TO",
"type": "dropdown",
"options": [
"random position",
"mouse-pointer",
"sprite1",
"..."
]
}
],
"example_standalone": "go to [random position v]",
"example_with_other_blocks": [
{
"script": "when this sprite clicked\n go to [mouse-pointer v]",
"explanation": "This script moves the sprite to the current position of the mouse pointer whenever the sprite is clicked."
}
]
},
{
"block_name": "go to x: () y: ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_gotoxy",
"functionality": "Moves the sprite to the specified X and Y coordinates on the stage.",
"inputs": [
{
"name": "X",
"type": "number"
},
{
"name": "Y",
"type": "number"
}
],
"example_standalone": "go to x: (0) y: (0)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n go to x: (0) y: (0)\n say [Ready to start! v] for (1) seconds\nend",
"explanation": "This script positions the sprite at the center of the stage at the beginning of the project and then makes it say 'Ready to start!'."
}
]
},
{
"block_name": "glide () secs to ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_glideto",
"functionality": "Glides the sprite smoothly to a specified location (random position, mouse pointer, or another sprite) over a given number of seconds.",
"inputs": [
{
"name": "SECS",
"type": "number"
},
{
"name": "TO",
"type": "dropdown",
"options": [
"random position",
"mouse-pointer",
"sprite1",
"..."
]
}
],
"example_standalone": "glide (1) secs to [random position v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n glide (1) secs to [mouse-pointer v]\nend",
"explanation": "This script makes the sprite glide smoothly to the mouse pointer's position over 1 second when the green flag is clicked."
}
]
},
{
"block_name": "glide () secs to x: () y: ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_glidesecstoxy",
"functionality": "Glides the sprite smoothly to the specified X and Y coordinates over a given number of seconds.",
"inputs": [
{
"name": "SECS",
"type": "number"
},
{
"name": "X",
"type": "number"
},
{
"name": "Y",
"type": "number"
}
],
"example_standalone": "glide (1) secs to x: (100) y: (50)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n glide (2) secs to x: (150) y: (-100)\n glide (2) secs to x: (-150) y: (100)\nend",
"explanation": "This script makes the sprite glide to two different points on the stage, taking 2 seconds for each movement."
}
]
},
{
"block_name": "point in direction ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_pointindirection",
"functionality": "Sets the sprite's direction to a specified angle in degrees (0 = up, 90 = right, 180 = down, -90 = left).",
"inputs": [
{
"name": "DIRECTION",
"type": "number"
}
],
"example_standalone": "point in direction (90)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n point in direction (0)\n move (100) steps\nend",
"explanation": "This script makes the sprite point upwards (0 degrees) and then move 100 steps in that direction."
}
]
},
{
"block_name": "point towards ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_pointtowards",
"functionality": "Points the sprite towards the mouse pointer or another specified sprite.",
"inputs": [
{
"name": "TOWARDS",
"type": "dropdown",
"options": [
"mouse-pointer",
"sprite1",
"..."
]
}
],
"example_standalone": "point towards [mouse-pointer v]",
"example_with_other_blocks": [
{
"script": "when this sprite clicked\n point towards [mouse-pointer v]\n move (10) steps\nend",
"explanation": "When the sprite is clicked, it will point towards the mouse pointer and then move 10 steps in that direction."
},
{
"script": "when green flag clicked\n forever\n point towards [mouse-pointer v]\n move (5) steps\n end\nend",
"explanation": "This script makes the sprite continuously follow the mouse pointer."
}
]
},
{
"block_name": "change x by ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_changexby",
"functionality": "Changes the sprite's X-coordinate by the specified amount, moving it horizontally.",
"inputs": [
{
"name": "DX",
"type": "number"
}
],
"example_standalone": "change x by (10)",
"example_with_other_blocks": [
{
"script": "when [right arrow v] key pressed\n change x by (10)\nend",
"explanation": "This script moves the sprite 10 steps to the right when the right arrow key is pressed."
}
]
},
{
"block_name": "set x to ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_setx",
"functionality": "Sets the sprite's X-coordinate to a specific value, placing it at a precise horizontal position.",
"inputs": [
{
"name": "X",
"type": "number"
}
],
"example_standalone": "set x to (0)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set x to (0)\n set y to (0)\nend",
"explanation": "This script centers the sprite horizontally at the start of the project."
}
]
},
{
"block_name": "change y by ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_changeyby",
"functionality": "Changes the sprite's Y-coordinate by the specified amount, moving it vertically.",
"inputs": [
{
"name": "DY",
"type": "number"
}
],
"example_standalone": "change y by (10)",
"example_with_other_blocks": [
{
"script": "when [up arrow v] key pressed\n change y by (10)\nend",
"explanation": "This script moves the sprite 10 steps up when the up arrow key is pressed."
}
]
},
{
"block_name": "set y to ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_sety",
"functionality": "Sets the sprite's Y-coordinate to a specific value, placing it at a precise vertical position.",
"inputs": [
{
"name": "Y",
"type": "number"
}
],
"example_standalone": "set y to (0)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set x to (0)\n set y to (0)\nend",
"explanation": "This script centers the sprite vertically at the start of the project."
}
]
},
{
"block_name": "if on edge, bounce",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_ifonedgebounce",
"functionality": "Reverses the sprite's direction if it touches the edge of the stage.",
"inputs": null,
"example_standalone": "if on edge, bounce",
"example_with_other_blocks": [
{
"script": "when I receive [start moving v]\n repeat (50)\n move (5) steps\n if on edge, bounce\n end\nend",
"explanation": "Upon receiving the 'start moving' broadcast, the sprite will move 5 steps repeatedly for 50 times, bouncing off edges if it touches them."
},
{
"script": "when green flag clicked\n forever\n move (10) steps\n if on edge, bounce\n end\nend",
"explanation": "This script makes the sprite move continuously and bounce off the edges of the stage."
}
]
},
{
"block_name": "set rotation style ()",
"block_type": "Motion",
"block_shape": "Stack Block",
"op_code": "motion_setrotationstyle",
"functionality": "Determines how the sprite rotates: 'left-right' (flips horizontally), 'don't rotate' (stays facing one direction), or 'all around' (rotates freely).",
"inputs": [
{
"name": "STYLE",
"type": "dropdown",
"options": [
"left-right",
"don't rotate",
"all around"
]
}
],
"example_standalone": "set rotation style [left-right v]",
"example_with_other_blocks": [
{
"script": "when backdrop switches to [game level 1 v]\n set rotation style [all around v]\nend",
"explanation": "When the backdrop changes to 'game level 1', the sprite's rotation style will be set to 'all around', allowing it to rotate freely."
},
{
"script": "when green flag clicked\n set rotation style [left-right v]\n forever\n move (10) steps\n if on edge, bounce\n end \nend",
"explanation": "This script makes the sprite move horizontally and flip its costume when it hits an edge, instead of rotating."
}
]
},
{
"block_name": "say () for () seconds",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_sayforsecs",
"functionality": "Displays a speech bubble containing specified text for a set duration.",
"inputs": [
{
"name": "MESSAGE",
"type": "string"
},
{
"name": "SECS",
"type": "number"
}
],
"example_standalone": "say [Hello!] for (2) seconds",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n say [Grr] for (3) seconds\n say [Have you seen my honey? v] for (3) seconds\nend",
"explanation": "This script makes the sprite display two sequential speech bubbles with different messages and durations. First, it says 'Grr' for 3 seconds, then 'Have you seen my honey?' for another 3 seconds."
}
]
},
{
"block_name": "say ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_say",
"functionality": "Displays a speech bubble with the specified text indefinitely until another 'say' or 'think' block is activated.",
"inputs": [
{
"name": "MESSAGE",
"type": "string"
}
],
"example_standalone": "say [Hello! v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n say [Welcome to my game! v]\n wait (2) seconds\n say [] \nend",
"explanation": "This script makes the sprite say 'Welcome to my game!' for 2 seconds, then clears the speech bubble."
}
]
},
{
"block_name": "think () for () seconds",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_thinkforsecs",
"functionality": "Displays a thought bubble containing specified text for a set duration.",
"inputs": [
{
"name": "MESSAGE",
"type": "string"
},
{
"name": "SECS",
"type": "number"
}
],
"example_standalone": "think [Hmm... v] for (2) seconds",
"example_with_other_blocks": [
{
"script": "when this sprite clicked\n think [What should I do? v] for (2) seconds\nend",
"explanation": "This script makes the sprite display a thought bubble saying 'What should I do?' for 2 seconds when clicked."
}
]
},
{
"block_name": "think ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_think",
"functionality": "Displays a thought bubble with the specified text indefinitely until another 'say' or 'think' block is activated.",
"inputs": [
{
"name": "MESSAGE",
"type": "string"
}
],
"example_standalone": "think [Got it! v]",
"example_with_other_blocks": [
{
"script": "when I receive [correct answer v]\n think [That's right! v]\n wait (1) seconds\n think [good v] \nend",
"explanation": "This script makes the sprite think 'That's right!' for 1 second when a 'correct answer' broadcast is received, then clears the thought bubble."
}
]
},
{
"block_name": "switch costume to ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_switchcostumeto",
"functionality": "Alters the sprite's appearance to a designated costume.",
"inputs": [
{
"name": "COSTUME",
"type": "dropdown/number"
}
],
"example_standalone": "switch costume to [costume1 v]",
"example_with_other_blocks": [
{
"script": "when I receive [explosion v]\n repeat (5)\n next costume\n end\n hide[costume1 v] \nend",
"explanation": "This script animates an explosion by rapidly switching costumes, then hides the sprite. [3]"
}
]
},
{
"block_name": "next costume",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_nextcostume",
"functionality": "Switches the sprite's costume to the next one in its costume list. If it's the last costume, it cycles back to the first.",
"inputs": null,
"example_standalone": "next costume",
"example_with_other_blocks": [
{
"script": "when [space v] key pressed\n repeat (3)\n next costume\n wait (0.1) seconds\n end \nend",
"explanation": "When the space key is pressed, the sprite will cycle through its next three costumes with a short delay between each change."
},
{
"script": "when green flag clicked\n forever\n next costume\n wait (0.2) seconds\n end \nend",
"explanation": "This script continuously animates the sprite by switching to the next costume every 0.2 seconds, creating a walking or flying effect."
}
]
},
{
"block_name": "switch backdrop to ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_switchbackdropto",
"functionality": "Changes the stage's backdrop to a specified backdrop.",
"inputs": [
{
"name": "BACKDROP",
"type": "dropdown/number"
}
],
"example_standalone": "switch backdrop to [backdrop1 v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n switch backdrop to [start screen v]\nend ",
"explanation": "This script sets the stage to a 'start screen' backdrop when the project begins."
}
]
},
{
"block_name": "switch backdrop to () and wait",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_switchbackdroptowait",
"functionality": "Changes the stage's backdrop to a specified backdrop and pauses the script until any 'When backdrop switches to' scripts for that backdrop have finished.",
"inputs": [
{
"name": "BACKDROP",
"type": "dropdown/number"
}
],
"example_standalone": "switch backdrop to [game over v] and wait",
"example_with_other_blocks": [
{
"script": "broadcast [game over v]\n switch backdrop to [game over v] and wait\n stop [all v] \nend",
"explanation": "This script broadcasts a 'game over' message, then changes the backdrop to 'game over' and waits for any associated scripts to finish before stopping all processes."
}
]
},
{
"block_name": "next backdrop",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_nextbackdrop",
"functionality": "Switches the stage's backdrop to the next one in its backdrop list. If it's the last backdrop, it cycles back to the first.",
"inputs": null,
"example_standalone": "next backdrop",
"example_with_other_blocks": [
{
"script": "when [space v] key pressed\n next backdrop\nend",
"explanation": "This script changes the stage to the next backdrop in the list each time the space key is pressed."
}
]
},
{
"block_name": "change size by ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_changesizeby",
"functionality": "Changes the sprite's size by a specified percentage. Positive values make it larger, negative values make it smaller.",
"inputs": [
{
"name": "CHANGE",
"type": "number"
}
],
"example_standalone": "change size by (10)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n repeat (10)\n change size by (5)\n wait (0.1) seconds\n end \nend ",
"explanation": "This script makes the sprite gradually grow larger over 10 steps, with a short pause between each size change."
}
]
},
{
"block_name": "set size to () %",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_setsizeto",
"functionality": "Sets the sprite's size to a specific percentage of its original size.",
"inputs": [
{
"name": "SIZE",
"type": "number"
}
],
"example_standalone": "set size to (100) %",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set size to (50) %\n wait (1) seconds\n set size to (100) %\nend ",
"explanation": "This script makes the sprite shrink to half its original size at the start, waits for 1 second, then returns to its original size."
}
]
},
{
"block_name": "change () effect by ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_changeeffectby",
"functionality": "Changes a visual effect on the sprite by a specified amount (e.g., color, fisheye, whirl, pixelate, mosaic, brightness, ghost).",
"inputs": [
{
"name": "EFFECT",
"type": "dropdown",
"options": [
"color",
"fisheye",
"whirl",
"pixelate",
"mosaic",
"brightness",
"ghost"
]
},
{
"name": "CHANGE",
"type": "number"
}
],
"example_standalone": "change [color v] effect by (25)",
"example_with_other_blocks": [
{
"script": "when loudness > (10)\n change [fisheye v] effect by (5)\nend",
"explanation": "When the loudness detected by the microphone is greater than 10, the sprite's fisheye effect will increase by 5."
},
{
"script": "when green flag clicked\n forever\n change [color v] effect by (5)\n wait (0.1) seconds\n end \nend",
"explanation": "This script makes the sprite continuously cycle through different colors."
}
]
},
{
"block_name": "set () effect to ()",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_seteffectto",
"functionality": "Sets a visual effect on the sprite to a specific value.",
"inputs": [
{
"name": "EFFECT",
"type": "dropdown",
"options": [
"color",
"fisheye",
"whirl",
"pixelate",
"mosaic",
"brightness",
"ghost"
]
},
{
"name": "VALUE",
"type": "number"
}
],
"example_standalone": "set [ghost v] effect to (50)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set [ghost v] effect to (75)\nend",
"explanation": "This script makes the sprite 75% transparent at the start of the project."
}
]
},
{
"block_name": "clear graphic effects",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_cleargraphiceffects",
"functionality": "Removes all visual effects applied to the sprite.",
"inputs": null,
"example_standalone": "clear graphic effects",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n change [color v] effect by (50)\n wait (2) seconds\n clear graphic effects\nend",
"explanation": "This script changes the sprite's color effect, waits 2 seconds, then resets all graphic effects."
}
]
},
{
"block_name": "show",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_show",
"functionality": "Makes the sprite visible on the stage.",
"inputs": null,
"example_standalone": "show",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n hide[start game v]\nwhen I receive [start game v]\n show [start game v] \nend",
"explanation": "This script hides the sprite at the beginning of the project and makes it visible when a 'start game' broadcast is received."
}
]
},
{
"block_name": "hide",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_hide",
"functionality": "Makes the sprite invisible on the stage.",
"inputs": null,
"example_standalone": "hide",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n hide \nend",
"explanation": "This script hides the sprite from the stage when the green flag is clicked."
}
]
},
{
"block_name": "go to () layer",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_gotofrontback",
"functionality": "Moves the sprite to the front-most or back-most layer of other sprites on the stage.",
"inputs": [
{
"name": "FRONT_BACK",
"type": "dropdown",
"options": [
"front",
"back"
]
}
],
"example_standalone": "go to [front v] layer",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n go to [front v] layer\nend",
"explanation": "This script ensures the sprite is always visible on top of other sprites at the start of the project."
}
]
},
{
"block_name": "go () layers",
"block_type": "Looks",
"block_shape": "Stack Block",
"op_code": "looks_goforwardbackwardlayers",
"functionality": "Moves the sprite forward or backward a specified number of layers in relation to other sprites.",
"inputs": [
{
"name": "FORWARD_BACKWARD",
"type": "dropdown",
"options": [
"forward",
"backward"
]
},
{
"name": "NUM",
"type": "number"
}
],
"example_standalone": "go [forward v] (1) layers",
"example_with_other_blocks": [
{
"script": "when this sprite clicked go [forward v] (1) layers\nend",
"explanation": "This script brings the clicked sprite one layer closer to the front."
}
]
},
{
"block_name": "play sound () until done",
"block_type": "Sound",
"block_shape": "Stack Block",
"op_code": "sound_playuntildone",
"functionality": "Plays a specified sound and pauses the script's execution until the sound has completed.",
"inputs": [
{
"name": "sound name",
"type": "dropdown"
}
],
"example_standalone": "play sound [Meow v] until done",
"example_with_other_blocks": [
{
"script": "when backdrop switches to [winning screen v]\n play sound [fanfare v] until done\n say [You won!] for (2) seconds\nend",
"explanation": "When the backdrop changes to the 'winning screen', a 'fanfare' sound will play until it finishes, and then the sprite will say 'You won!' for 2 seconds."
},
{
"script": "forever\n play sound [Music v] until done \nend",
"explanation": "This script creates a continuous loop for background music, playing the 'Music' sound repeatedly."
}
]
},
{
"block_name": "start sound ()",
"block_type": "Sound",
"block_shape": "Stack Block",
"op_code": "sound_start",
"functionality": "Initiates playback of a specified sound without pausing the script, allowing other actions to proceed concurrently.",
"inputs": [
{
"name": "sound name",
"type": "dropdown"
}
],
"example_standalone": "start sound [Pop v]",
"example_with_other_blocks": [
{
"script": "when this sprite clicked\n start sound [Pop v]\n change [score v] by (1)\nend",
"explanation": "This script plays a 'Pop' sound and increments the score simultaneously when the sprite is clicked."
}
]
},
{
"block_name": "stop all sounds",
"block_type": "Sound",
"block_shape": "Stack Block",
"op_code": "sound_stopallsounds",
"functionality": "Stops all currently playing sounds.",
"inputs": null,
"example_standalone": "stop all sounds",
"example_with_other_blocks": [
{
"script": "when I receive [game over v]\n stop all sounds\nend",
"explanation": "This script stops any sounds currently playing when the 'game over' broadcast is received."
}
]
},
{
"block_name": "change volume by ()",
"block_type": "Sound",
"block_shape": "Stack Block",
"op_code": "sound_changevolumeby",
"functionality": "Changes the project's sound volume by a specified amount.",
"inputs": [
{
"name": "change",
"type": "number"
}
],
"example_standalone": "change volume by (-10)",
"example_with_other_blocks": [
{
"script": "when [down arrow v] key pressed\n change volume by (-5)\nend",
"explanation": "This script decreases the project's volume by 5 when the down arrow key is pressed."
}
]
},
{
"block_name": "set volume to () %",
"block_type": "Sound",
"block_shape": "Stack Block",
"op_code": "sound_setvolumeto",
"functionality": "Sets the sound volume to a specific percentage (0-100).",
"inputs": [
{
"name": "percentage",
"type": "number"
}
],
"example_standalone": "set volume to (100) %",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set volume to (50) %\nend",
"explanation": "This script sets the project's volume to 50% when the green flag is clicked."
}
]
},
{
"block_name": "broadcast ()",
"block_type": "Events",
"block_shape": "Stack Block",
"op_code": "event_broadcast",
"functionality": "Sends a broadcast message throughout the Scratch program, activating any 'when I receive ()' blocks that are set to listen for that message, enabling indirect communication.",
"inputs": [
{
"name": "message name",
"type": "string/dropdown"
}
],
"example_standalone": "broadcast [start game v]",
"example_with_other_blocks": [
{
"script": "if <key [space v] pressed?> then\n broadcast [jump v]\nend",
"explanation": "This script sends a 'jump' message to other scripts or sprites when the space key is pressed."
}
]
},
{
"block_name": "broadcast () and wait",
"block_type": "Events",
"block_shape": "Stack Block",
"op_code": "event_broadcastandwait",
"functionality": "Sends a broadcast message and pauses the current script until all other scripts activated by that broadcast have completed their execution, ensuring sequential coordination.",
"inputs": [
{
"name": "message name",
"type": "string/dropdown"
}
],
"example_standalone": "broadcast [initialize sprites v] and wait",
"example_with_other_blocks": [
{
"script": "broadcast [initialize sprites v] and wait\n say [Game Started!] for (2) seconds",
"explanation": "This script ensures all sprite initialization routines complete before displaying 'Game Started!' for 2 seconds."
}
]
},
{
"block_name": "wait () seconds",
"block_type": "Control",
"block_shape": "Stack Block",
"op_code": "control_wait",
"functionality": "Pauses the script for a specified duration.",
"inputs": [
{
"name": "seconds",
"type": "number"
}
],
"example_standalone": "wait (1) seconds",
"example_with_other_blocks": [
{
"script": "say [Hello!] for (1) seconds\n wait (0.5) seconds\n say [Goodbye!] for (1) seconds",
"explanation": "This script creates a timed dialogue sequence, pausing for 0.5 seconds between two speech bubbles."
}
]
},
{
"block_name": "wait until ()",
"block_type": "Control",
"block_shape": "Stack Block",
"op_code": "control_wait_until",
"functionality": "Pauses the script until the specified boolean condition becomes true.",
"inputs": [
{
"name": "condition",
"type": "boolean"
}
],
"example_standalone": "wait until <key [space v] pressed?>",
"example_with_other_blocks": [
{
"script": "wait until <key [space v] pressed?>\n start sound [pop v]\nend",
"explanation": "This script pauses until the space key is pressed, then plays a 'pop' sound."
}
]
},
{
"block_name": "stop ()",
"block_type": "Control",
"block_shape": "Stack Block",
"op_code": "control_stop",
"functionality": "Stops all scripts, this script, or other scripts in the sprite. Becomes a Cap Block if 'all' or 'this script' is selected in the dropdown menu.",
"inputs": [
{
"name": "option",
"type": "dropdown",
"options": [
"all",
"this script",
"other scripts in sprite"
]
}
],
"example_standalone": "stop [all v]",
"example_with_other_blocks": [
{
"script": "if <score = (0)> then\n stop [all v]\nend",
"explanation": "This script stops the entire project if the 'score' variable becomes 0."
}
]
},
{
"block_name": "create clone of ()",
"block_type": "Control",
"block_shape": "Stack Block",
"op_code": "control_create_clone_of",
"functionality": "Generates a copy, or clone, of a specified sprite (or 'myself' for the current sprite).",
"inputs": [
{
"name": "sprite_name",
"type": "dropdown",
"options": [
"myself",
"sprite1",
"..."
]
}
],
"example_standalone": "create clone of [myself v]",
"example_with_other_blocks": [
{
"script": "when I start as a clone\n show\n go to random position\n wait (2) seconds\n delete this clone\nend",
"explanation": "When a clone is created, it will show itself, go to a random position, wait for 2 seconds, and then delete itself."
}
]
},
{
"block_name": "delete this clone",
"block_type": "Control",
"block_shape": "Stack Block",
"op_code": "control_delete_this_clone",
"functionality": "Deletes the clone that is currently running the script.",
"inputs": null,
"example_standalone": "delete this clone",
"example_with_other_blocks": [
{
"script": "when I start as a clone\n wait (5) seconds\n delete this clone\nend",
"explanation": "This script makes each clone wait for 5 seconds after it's created, then deletes itself."
}
]
},
{
"block_name": "set [my variable v] to ()",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_setvariableto",
"functionality": "Assigns a specific value (number, string, or boolean) to a variable.",
"inputs": [
{
"name": "variable name",
"type": "dropdown"
},
{
"name": "value",
"type": "any"
}
],
"example_standalone": "set [score v] to (0)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set [score v] to (0)\n set [player name v] to [Guest]\nend",
"explanation": "This script initializes the 'score' variable to 0 and the 'player name' variable to 'Guest' when the project starts."
}
]
},
{
"block_name": "change [my variable v] by ()",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_changevariableby",
"functionality": "Increases or decreases a variable's numerical value by a specified amount.",
"inputs": [
{
"name": "variable name",
"type": "dropdown"
},
{
"name": "value",
"type": "number"
}
],
"example_standalone": "change [score v] by (1)",
"example_with_other_blocks": [
{
"script": "when this sprite clicked\n change [score v] by (1)\nend",
"explanation": "This script increments the 'score' variable by 1 each time the sprite is clicked."
}
]
},
{
"block_name": "add () to [my list v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_addtolist",
"functionality": "Appends an item to the end of a list.",
"inputs": [
{
"name": "item",
"type": "any"
},
{
"name": "list name",
"type": "dropdown"
}
],
"example_standalone": "add [apple] to [shopping list v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n add [apple] to [shopping list v]\n add [banana] to [shopping list v]\nend",
"explanation": "This script adds 'apple' and 'banana' as new items to the 'shopping list' when the project starts."
}
]
},
{
"block_name": "delete () of [my list v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_deleteoflist",
"functionality": "Removes an item from a list by its index or by selecting 'all' items.",
"inputs": [
{
"name": "index/option",
"type": "number/dropdown",
"options": [
"all",
"last",
"random"
]
},
{
"name": "list name",
"type": "dropdown"
}
],
"example_standalone": "delete (1) of [my list v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n delete (all) of [my list v]\nend",
"explanation": "This script clears all items from 'my list' when the green flag is clicked."
}
]
},
{
"block_name": "insert () at () of [my list v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_insertatlist",
"functionality": "Inserts an item at a specific position within a list.",
"inputs": [
{
"name": "item",
"type": "any"
},
{
"name": "index",
"type": "number"
},
{
"name": "list name",
"type": "dropdown"
}
],
"example_standalone": "insert [orange] at (2) of [fruits v]",
"example_with_other_blocks": [
{
"script": "insert [orange] at (2) of [fruits v]",
"explanation": "This script inserts 'orange' as the second item in the 'fruits' list, shifting subsequent items."
}
]
},
{
"block_name": "replace item () of [my list v] with ()",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_replaceitemoflist",
"functionality": "Replaces an item at a specific position in a list with a new value.",
"inputs": [
{
"name": "index",
"type": "number"
},
{
"name": "list name",
"type": "dropdown"
},
{
"name": "new item",
"type": "any"
}
],
"example_standalone": "replace item (1) of [colors v] with [blue]",
"example_with_other_blocks": [
{
"script": "replace item (1) of [colors v] with [blue]",
"explanation": "This script changes the first item in the 'colors' list to 'blue'."
}
]
},
{
"block_name": "show variable [my variable v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_showvariable",
"functionality": "Makes a variable's monitor visible on the stage.",
"inputs": [
{
"name": "variable name",
"type": "dropdown"
}
],
"example_standalone": "show variable [score v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n show variable [score v]\nend",
"explanation": "This script displays the 'score' variable on the stage when the project starts."
}
]
},
{
"block_name": "hide variable [my variable v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_hidevariable",
"functionality": "Hides a variable's monitor from the stage.",
"inputs": [
{
"name": "variable name",
"type": "dropdown"
}
],
"example_standalone": "hide variable [score v]",
"example_with_other_blocks": [
{
"script": "when I receive [game over v]\n hide variable [score v]\nend",
"explanation": "This script hides the 'score' variable when the 'game over' broadcast is received."
}
]
},
{
"block_name": "show list [my list v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_showlist",
"functionality": "Makes a list's monitor visible on the stage.",
"inputs": [
{
"name": "list name",
"type": "dropdown"
}
],
"example_standalone": "show list [shopping list v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n show list [shopping list v]\nend",
"explanation": "This script displays the 'shopping list' on the stage when the project starts."
}
]
},
{
"block_name": "hide list [my list v]",
"block_type": "Data",
"block_shape": "Stack Block",
"op_code": "data_hidelist",
"functionality": "Hides a list's monitor from the stage.",
"inputs": [
{
"name": "list name",
"type": "dropdown"
}
],
"example_standalone": "hide list [shopping list v]",
"example_with_other_blocks": [
{
"script": "when I receive [game over v]\n hide list [shopping list v]\nend",
"explanation": "This script hides the 'shopping list' when the 'game over' broadcast is received."
}
]
},
{
"block_name": "Ask () and Wait",
"block_type": "Sensing",
"block_shape": "Stack Block",
"op_code": "sensing_askandwait",
"functionality": "Displays an input box with specified text at the bottom of the screen, allowing users to input text, which is stored in the 'Answer' block.",
"inputs": [
{
"name": "question",
"type": "text"
}
],
"example_standalone": "ask [What is your name? v] and wait",
"example_with_other_blocks": [
{
"script": "ask [What is your name? v] and wait\n say join [Hello v] (answer) for (2) seconds \nend",
"explanation": "This script prompts the user for their name, waits for input, then greets them using the provided answer."
}
]
},
{
"block_name": "Reset Timer",
"block_type": "Sensing",
"block_shape": "Stack Block",
"op_code": "sensing_resettimer",
"functionality": "Sets the timer’s value back to 0.0.",
"inputs": null,
"example_standalone": "reset timer",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n reset timer\n wait (5) seconds\n say timer for (2) seconds\nend",
"explanation": "This script resets the timer at the start, waits for 5 seconds, then says the current timer value."
}
]
},
{
"block_name": "set drag mode [draggable v]",
"block_type": "Sensing",
"block_shape": "Stack Block",
"op_code": "sensing_setdragmode",
"functionality": "Sets whether the sprite can be dragged by the mouse on the stage.",
"inputs": null,
"fields": {
"DRAG_MODE": {
"type": "dropdown",
"options": [
"draggable",
"not draggable"
]
}
},
"example_standalone": "set drag mode [draggable v]",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n set drag mode [not draggable v]\nend when this sprite clicked\n set drag mode [draggable v] \nend",
"explanation": "This script makes the sprite not draggable when the project starts, but allows it to be dragged once it's clicked."
}
]
},
{
"block_name": "[my custom block]",
"block_type": "My Blocks",
"block_shape": "Stack Block",
"op_code": "procedures_call",
"functionality": "Executes the script defined by a corresponding 'define' Hat block. This block allows users to call and reuse custom code sequences by simply dragging and dropping it into their scripts, optionally providing required input values.",
"inputs": [
{
"name": "argument_name_1",
"type": "any"
},
{
"name": "argument_name_2",
"type": "any"
}
],
"example_standalone": "jump (50)",
"example_with_other_blocks": [
{
"script": "when green flag clicked\n go to x: (0) y: (0)\n jump (50)\n wait (1) seconds\n say [I jumped!] for (2) seconds",
"explanation": "This script moves the sprite to a starting position, then calls the 'jump' custom block with an input of 50 (assuming 'jump' is a custom block that moves the sprite up and down). After the jump, the sprite says 'I jumped!'."
},
{
"script": "when green flag clicked\n hide\n forever\n create clone of [myself v]\n wait (1) seconds\n end",
"explanation": "This script continuously creates new clones of the current sprite every second after the original sprite hides itself."
}
]
}
]
} |