Push Down Automata's icon

Push Down Automata 1.2 Tools 3.3 Community

Submitted by user batomow; MIT; 2021-11-11

A super easy and flexible PDA implementation.
A PDA is basically a finite state machine with a stack.
Just add the Machine node and fill in the export options.
A relative dependency is a child of the entity. Just type the name of the child in the inspector like so: "AnimationPlayer".
A global dependency can be any node, just tap de exported NodePath and select a node. If your Machine node is a child of the entity you can use whichever method you prefer.
To add a new state, create a new script that inherits anything.
Just use one of the templates. I recommend starting with the tutorial one.
For animations to work, just add any dependency of type AnimationPlayer.
The state buffer ensures that the stack never grows too large. (Just a buffer_size of 3 should be enough tho)
You can reference your dependencies (nodes in the scene tree) by just declaring them in the state script in snake case (e.g. animation_player), just name them in the regular PascalCase convention in the scene tree.
Your state names match your script name, just use PascalCase. (e. g. `push_state('Idle')` )

View files Download Submit an issue Recent Edits