A state change is something the graph can react to, so the machine announces it (#53, #54, #55, #57)
game-maker / suite (push) Successful in 10m58s
game-maker / suite (push) Successful in 10m58s
Four issues that all reach for the same line: how the current state is read and written. Splitting them into four commits would mean four states of the tree that do not compile, so they arrive together. #55 start state — the machine asset carries an optional `start` holding a State node's id. Right-click a state to set or remove it, a ring in the node's title says which one it is. A dead id (the state was deleted) reads as "no start", so nothing has to clean up after a deletion. #53 entered/exited — `On state entered` and `On state exited`, one exec output per state. Every change now goes through a single `setState` that reports it; BehaviorSystem delivers it after the exec flow that caused it, `exited` of the old before `entered` of the new, round after round until the queue is empty, with a cap that stops a ping-pong graph with an endless-loop error. A local machine tells the instance that switched, a global one tells every instance holding a matching event node. The start state fires `entered` too: per instance for a local machine, once per run for a global one. #57 reading — `Current state` with `name` for showing and `id` for comparing, `Is in state` with one boolean per state. Neither has a `run`, so `read` learned `def` and `lookup`, and the catalog test knows this third kind of node. #54 seeing it — during a run the state machine tab marks every state some instance is holding faintly, and the one held by the selected scene object's instance strongly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bc57f61c91
commit
7babf88636
30 files changed
+906
-44
No files matched your search
@@ -23,6 +23,7 @@ import { GetPosition } from './data/GetPosition';
|
||||
import { IsAsset } from './data/IsAsset';
|
||||
import { IsEnabled } from './data/IsEnabled';
|
||||
import { IsHovered } from './data/IsHovered';
|
||||
import { IsInState } from './data/IsInState';
|
||||
import { IsTouching } from './data/IsTouching';
|
||||
import { Join } from './data/Join';
|
||||
import { KeyIsDown } from './data/KeyIsDown';
|
||||
@@ -61,6 +62,7 @@ import { ToNumber } from './data/ToNumber';
|
||||
import { ToText } from './data/ToText';
|
||||
import { Concat } from './data/Concat';
|
||||
import { Count } from './data/Count';
|
||||
import { CurrentState } from './data/CurrentState';
|
||||
import { ExpandStruct } from './data/ExpandStruct';
|
||||
import { Fill } from './data/Fill';
|
||||
import { IndexOf } from './data/IndexOf';
|
||||
@@ -79,6 +81,8 @@ import { OnKeyDown } from './events/OnKeyDown';
|
||||
import { OnKeyHeld } from './events/OnKeyHeld';
|
||||
import { OnKeyUp } from './events/OnKeyUp';
|
||||
import { OnStart } from './events/OnStart';
|
||||
import { OnStateEntered } from './events/OnStateEntered';
|
||||
import { OnStateExited } from './events/OnStateExited';
|
||||
import { OnTimer } from './events/OnTimer';
|
||||
import { OnUpdate } from './events/OnUpdate';
|
||||
import { BehaviorEnd } from './flow/BehaviorEnd';
|
||||
@@ -114,6 +118,8 @@ export const BUILT_IN_NODES: readonly NodeDef[] = [
|
||||
OnCollisionExit,
|
||||
OnClick,
|
||||
OnAnimationFinished,
|
||||
OnStateEntered,
|
||||
OnStateExited,
|
||||
BehaviorStart,
|
||||
Branch,
|
||||
Sequence,
|
||||
@@ -122,6 +128,8 @@ export const BUILT_IN_NODES: readonly NodeDef[] = [
|
||||
StateBranch,
|
||||
SetState,
|
||||
StateTransition,
|
||||
CurrentState,
|
||||
IsInState,
|
||||
BehaviorEnd,
|
||||
Variables,
|
||||
Self,
|
||||
|
||||
Reference in new issue
Block a user