build_control_variable
Create a Control Variables event command for RPG Maker MZ, specifying an operation, target variable range, and operand (constant, variable, random, or game data). Returns the command for insertion.
Instructions
Build a Control Variables (122) event command for insertion via insert_event_commands. Applies operation (set/add/sub/mul/div/mod) to a variable (or the inclusive variableId..endId range) using an operand: constant, another variable, a random range, or game_data (item/actor/party/… readouts). Read-only: returns { command }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endId | No | Inclusive range end (default = variableId, a single variable) | |
| indent | No | Indentation level (default 0) | |
| operand | Yes | The right-hand operand of the Control Variables command | |
| operation | No | Arithmetic applied to the target (default set) | |
| variableId | Yes | The target variable id (range start) |