events_add
Insert events, groups, variables, comments, or includes into a Construct 2 event sheet, positioning them at the end, under a parent, or next to a specific item.
Instructions
Insert events, groups, variables, comments or includes. Without a position they go to the end of the sheet; parent_sid puts them as sub-events of an event/group; after_sid/before_sid places them next to an item. Item shapes: {"conditions": [...], "actions": [...], "sub_events": [...], "or": false, "disabled": false} {"type": "group", "title": "...", "description": "", "active": true, "events": [...]} {"type": "variable", "name": "Score", "var_type": "number|text|boolean", "value": 0, "constant": false, "static": false} {"type": "comment", "text": "..."} {"type": "include", "sheet": "Common"} A condition/action: {"object": "Player", "behavior": "Platform"?, "ace": "Is on floor", "params": [...] or {"Name": value}, "inverted": false}. Returns the sheet as text with the new sids.
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>",
"sheet": "<sheet>",
"items": "<items>"
},
"name": "events_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | ||
| items | Yes | ||
| sheet | Yes | ||
| project | Yes | ||
| after_sid | No | ||
| before_sid | No | ||
| parent_sid | No | ||
| editor_sync | No |