Create a new actor in a scene
create_actorAdd a new actor to a GB Studio scene, respecting hardware limits: up to 20 actors in normal scenes, 10 in small scenes. Specify position, name, sprite, and collision settings.
Instructions
Append a new actor file under project/scenes//actors/. Enforces GB Studio hardware caps: up to MAX_ACTORS=20 per normal scene, MAX_ACTORS_SMALL=10 when scene width*height <= 160 tiles. Coordinates default to tiles. Pass spriteSheetId of an existing sprite, or leave empty (actor will not render until set).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X position (tiles by default). | |
| y | Yes | Y position (tiles by default). | |
| name | Yes | Display name — also seeds the slug. | |
| symbol | No | Override auto-generated GBVM symbol. | |
| sceneId | Yes | Target scene id (UUID). | |
| animSpeed | No | Animation speed (0..15). Default 3. | |
| direction | No | Initial facing direction. Default down. | |
| moveSpeed | No | Movement speed (0..4). Default 1. | |
| paletteId | No | Palette id for CGB. Empty uses default. | |
| spriteSheetId | No | Sprite resource id. Empty allowed; actor won't render until set. | |
| collisionGroup | No | Collision group. Default empty (no group). | |
| coordinateType | No | Coordinate units. Default tiles. |