object_create
Adds an object type to a Construct 2 project, creating its required instance and optional image or frames so the object can be spawned at runtime.
Instructions
Add an object type. plugin: id or name (Sprite, Text, TiledBg, 9patch, Keyboard, Mouse, Audio, Function,
Array, ...). Sprites take image (any image file) or frames (several); without one a visible placeholder
is made. Like the editor's Insert Object, a world object also gets one instance placed (on layout, default
the first; at x/y, default just outside the layout) because Construct 2 can only spawn objects at runtime
that have an instance somewhere. Project-wide plugins (Keyboard, Audio...) get their global instance;
properties sets its values.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"name": "<name>",
"plugin": "<plugin>"
},
"name": "object_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| loop | No | ||
| name | Yes | ||
| image | No | ||
| speed | No | ||
| folder | No | ||
| frames | No | ||
| layout | No | ||
| plugin | Yes | ||
| project | Yes | ||
| animation | No | Default | |
| properties | No | ||
| editor_sync | No |