scene_add_unit_status
Defines a temporary unit status effect—outline, see-through, speed, invincibility, rooting, or stat boosts—with optional duration and returns a statusId to apply or remove it in a copied save.
Instructions
Define a unit status (单位状态) in a copy of a save: an effect that a graph puts on an entity and takes off again. outline draws a coloured edge around the entity, the platform's usual way to say "you can interact with this" or to mark a team, and it needs no text; seeThrough shows the entity through walls in a colour; maxHealth raises maximum health by a number per stack. Colours: green or white (or a colour code of the editor as a number; only those two are mapped). The status lasts until it is removed. Returns statusId for f.addUnitStatus / f.removeUnitStatus. Writes a new .gil in the workspace; the official save is not touched. Verified in play on 2026-10-10: a green outline on an object and a white one on a character, put on with f.addUnitStatus(character that walked in, target, statusId, 1n, dictionary) and taken off with f.removeUnitStatus (the applier, the first argument, is the character, as in the official sample). More effects, which may be combined in one status: speedPercent (movement speed of a character or a creature, a whole percentage up to +40, which is as far as the editor goes; negative slows), invincible true (takes no damage and does not hear attacks), superJump [horizontal, vertical] (the multipliers of a character's jump: [1.5, 2] jumps half again as far and twice as high), rooted true (the player's character cannot be moved with the keys: a stun, a trap). These are what pickups and hazards are made of: a boot that speeds up for some seconds, a star that makes invincible, tar that slows, a snare that holds. seconds makes the status end by itself after that long (left out it stays until a graph removes it). The effect ids were read from a status configured by hand in the editor on 2026-10-13. Verified in play that day (examples/hazards): after a pickup of speedPercent 40 the player covered 9.4 m in the next 1.2 s (5.2 m/s without), one of rooted with seconds 2 held the player on the spot for two seconds with the movement key down; with invincible on, an attack of 2000 that had taken a thousand health a moment before took none; with superJump [1, 2.5] a jump on the spot rose three metres (hazards_test2.json).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| rooted | No | ||
| mapPath | No | ||
| outline | No | ||
| seconds | No | ||
| maxHealth | No | ||
| superJump | No | ||
| invincible | No | ||
| outputName | No | ||
| seeThrough | No | ||
| stackLimit | No | ||
| speedPercent | No |