scene_add_creature_skill
Defines a complex creature's skill by binding an animation to a client graph that triggers at chosen moments, enabling attacks, projectiles, effects, and target-facing behavior in a save copy.
Instructions
Define a skill of a complex creature (造物技能) in a copy of a save: an animation of that creature and a client graph that runs at a chosen moment of it. A complex creature (an asset of the group "怪物(AI版)": scene_search_assets {group:"怪物(AI版)"}) does nothing by itself; what it can do beyond walking is its skills: swing and hit, shoot, dig, hammer at a wall, look around. creature is the asset id of the creature the skill is for (a skill plays the animations of one model and can only be given to that creature). animation is one of its animations, by id or by name ("近战攻击_01"): creature_animations {creature} lists them with their lengths; animations gives several, played one after another (a wind-up, a loop, a recovery). graphId is a graph made with scene_add_graph {kind:"creatureSkill"}; it runs graphAtMs milliseconds into the skill (the moment the weapon lands, the arrow leaves): there it triggers a hit box, fires a projectile or tells a server graph (f.notifyServerNodeGraph, heard as whenSkillNodeIsCalled by a server graph on the creature's own prefab). graphAtMs may be a list of moments, and the graph then runs at each of them: the three strokes of a triple stroke ([350, 900, 1700] for 单手武器_三连击) each trigger its hit box (seen in play; the graph cannot tell which of the moments it is). faceTarget (自动面向目标) turns the creature to its target while the skill plays; interrupts (可打断其他技能) lets the skill cut off another one. effect shows an effect on an attachment point of the creature for part of the animation: the thing the creature holds only while it does this (a pickaxe on GI_WeaponR while it digs, the knife in its hand until it is thrown; what is carried all the time is mounted by a server graph instead, f.mountLoopingSpecialEffect). animationPortion plays only the first part of the animation (0.62 leaves out the two seconds 盗宝团·斥候 just stands at the end of its throw). creature_animations says for the animations that were looked at in play which moment counts and what belongs in the hand; the result repeats it (hint) when graphAtMs is far from that moment. Give the skill to a creature with scene_set_creature_logic, which also sets its cooldown. Writes a new .gil in the workspace; the official save is not touched. A skill of one animation is byte for byte the skill of the official sample 复杂造物; several animations and the two switches are written as the editor saved them on 2026-10-11.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| effect | No | ||
| graphId | Yes | ||
| mapPath | No | ||
| creature | Yes | ||
| animation | No | ||
| graphAtMs | No | ||
| animations | No | ||
| faceTarget | No | ||
| interrupts | No | ||
| outputName | No | ||
| animationPortion | No |