build_control_switch
Generate Control Switch or Control Self Switch event commands for RPG Maker MZ. Specify scope, switch id/range or self switch A-D, and on/off value to produce insertable command.
Instructions
Build a Control Switches (121) or Control Self Switch (123) event command for insertion via insert_event_commands. scope "switch": set a switch (or the inclusive switchId..endId range) on/off. scope "self_switch": set the current event's self switch A–D. Read-only: returns { command }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | self_switch: which self switch | |
| endId | No | switch: inclusive range end (default = switchId, a single switch) | |
| scope | Yes | "switch" (global, by id/range) or "self_switch" (this event, A–D) | |
| value | No | Set on (default) or off | |
| indent | No | Indentation level (default 0) | |
| switchId | No | switch: the switch id (range start) |