Sgwaveyjoneshand
Based on game build 714014 | Last updated: 2026-03-08
Overview
SGwaveyjoneshand is a state graph that controls the behavior and animation state of Wavey Jones' mechanical hand. It manages transitions between idle, movement, short/looped actions (e.g., raising/lowering sail or anchor), and special states like being trapped or relocated. It integrates with the locomotor component for movement and the timer component for timed trap handling, while also forwarding state events to an attached handart visual component.
Usage example
-- Typically instantiated automatically for the Wavey Jones hand entity.
-- Custom usage would involve ensuring the entity has the required components:
local hand = CreateEntity()
hand:AddComponent("locomotor")
hand:AddComponent("timer")
-- The state graph is assigned by the game engine during entity prefab definition.
-- No direct instantiation by modders is required.
Dependencies & tags
Components used: locomotor, timer
Tags added/removed: States add/remove tags including busy, idle, canrotate, moving, trapped.
Event handlers: Listens for locomote, trapped, animover, animqueueover, performbufferedaction, stopraisinganchor, released, timerdone.
Properties
No public properties.
Main functions
This is a stategraph definition—there are no callable public functions exposed to external code. Behavior is defined declaratively via states, events, and actionhandlers.
Events & listeners
- Listens to:
locomote– Triggers hand rotation and conditionally transitions topremovingif moving without busy/attack state.trapped– Transitions totrappedstate and starts atrappedtimer.animover– Used in multiple states to transition toidleormovingafter animation completes.animqueueover– Transitions toidleafter queue completion (e.g., short actions).performbufferedaction– Executes buffered action and clears target, then laughs if arm is attached.stopraisinganchor– Transitions toloop_action_anchor_pstfor anchor-lowering sequences.released– Transitions fromtrappedtotrapped_pst.timerdone– Triggersscared_relocatewhentrappedtimerexpires while trapped.
- Pushes:
"STATE_IN","STATE_IDLE","STATE_PREMOVING","STATE_MOVING","STATE_SHORT_ACTION","STATE_LOOP_ACTION_ANCHOR","STATE_LOOP_ACTION_ANCHOR_PST","STATE_TRAPPED","STATE_TRAPPED_PST","STATE_SCARED_RELOCATE"– Forwarded viapasstate()to thehandartcomponent for animation sync."laugh"– Sent toinst.arm.jones(if valid) after successful short or looped actions."startlongaction"– Sent tobufferedaction.targetwhen a looped anchor action begins.