Sgcritter Eyeofterror
Based on game build 714014 | Last updated: 2026-03-08
Overview
SGcritter_eyeofterror is a state graph that controls the behavior and animations of the Eye of Terror critter entity. It extends reusable critter states (from SGcritter_common.lua) and defines custom state transitions, emotes, and sound effects specific to this creature. Notably, it manages flight mechanics by dynamically adding/removing the flying tag during specific animations (e.g., emotes, eating, nuzzling) and fires on_landed/on_no_longer_landed events accordingly.
Usage example
This state graph is automatically applied to the Eye of Terror prefab and is not typically added directly by mods. A modder would reference it if extending or overriding critter behavior.
Dependencies & tags
Components used: soundemitter (for playing sounds via inst.SoundEmitter:PlaySound(...)).
Tags: Adds/Removes flying; fires on_landed and on_no_longer_landed events during animation timelines.
Properties
No public properties.
Main functions
lower_flying_creature(inst)
- Description: Removes the
flyingtag from the entity and pusheson_landed. - Parameters:
inst(entity) — the Eye of Terror instance. - Returns: Nothing.
raise_flying_creature(inst)
- Description: Adds the
flyingtag to the entity and pusheson_no_longer_landed. - Parameters:
inst(entity) — the Eye of Terror instance. - Returns: Nothing.
Events & listeners
- Listens to:
on_landed(viaon_landedevent push),on_no_longer_landed(viaon_no_longer_landedevent push). - Pushes:
on_landed,on_no_longer_landed.