Add a sprite
add_spriteAdd a sprite to a Scratch project using built-in costumes, with optional tinting, position, size, direction, and rotation style.
Instructions
Adds a sprite using a built-in costume (ball, square, triangle, star, heart, arrow, dot, line, buddy), optionally tinted like "ball:red". To use character art from a file, use import_character instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | -240 to 240, 0 is centre | |
| y | No | -180 to 180, 0 is centre | |
| file | No | Path to an svg, png or jpg costume instead of a built-in | |
| name | Yes | Sprite name, used to target it in add_script | |
| size | No | Size in percent, default 100 | |
| costume | No | Built-in costume, default "buddy" (two frames, so next_costume animates) | |
| visible | No | ||
| direction | No | 90 points right, 0 up, -90 left | |
| rotation_style | No |