Sgeyeofterror Mini
Based on game build 714014 | Last updated: 2026-03-08
Overview
SGeyeofterror_mini defines the state machine for the Mini Eye of Terror entity, a flying boss-like enemy in DST. It orchestrates behavior such as idle movement, attacking, taunting, eating, and death through a series of named states and transitions. The stategraph integrates with the locomotor component to manage movement and the combat component for attack execution. Key behaviors include controlling the entity’s flying state (via flying tag) during lifecycle events like death and eating.
Usage example
This stategraph is instantiated automatically for the appropriate prefab (eyeofterror_mini) by the engine and does not require manual instantiation. Modders typically interact with it via:
- Calling
inst.sg:GoToState("state_name")to force state changes. - Registering custom event handlers in the
eventstable. - Modifying behavior by overriding states or timelines (e.g.,
appear_timeline,deathtimeline) viaCommonStatesextensions.
Dependencies & tags
Components used: locomotor, combat
Tags added/removed:
- Adds/removed
flyingtag during states like death and eat (vialower_flying_creature/raise_flying_creature). - States add tags:
idle,canrotate,busy,attack,charge. - Stategraph name:
"eyeofterror_mini".
Properties
No public properties.
Main functions
No custom public functions; state behavior is defined via state table entries (onenter, onexit, timeline, events). The module exports a StateGraph instance, which is consumed by the engine.
Events & listeners
- Listens to:
animover(go toidle)animqueueover(transition based on randomness or success flag; totauntoridle)- Sleep/wake/freeze/electrocute events (via
CommonHandlers) - Death-related events (
CommonHandlers.OnCorpseDeathAnimOver, etc.) - Locomotion events (
CommonHandlers.OnLocomote) - Attack/attacked/death events (
CommonHandlers.OnAttack, etc.)
- Pushes:
on_landed(whenlower_flying_creatureis called)on_no_longer_landed(whenraise_flying_creatureis called)- Standard combat/locomotion/death events handled via
CommonHandlers.