Looking for the 'official' way to accomplish something like this with Playmaker ..
I will have NPCs and mobs with multiple layers of FSMs .. sort of an FSM hierarchy:
- lowest level is core fight-or-flight responses .. e.g. extreme panic/rage/fear.
- next level will have basic reasoning/needs (following pathfinding waypoints, following goals)
- next level is more advanced reasoning (+ fragmaps, setting intelligent waypoints/goals/personal objectives)
- and then squad-interaction above that (+ squad information/fragmaps, coordinating multiple waypoints or objectives)
I would like to be able to share the lowest-level FSM with creatures of all types -- whether an NPC or a pig, without needing to re-implement it manually for every prefab.
Should I simply create a GameObject to represent each of the FSM levels, prefab them independently, and then attach that prefab to the other prefabs?
Or is there a way to export/import an FSM between GameObjects? I can have multiple on a single GameObject, but can I easily export from one and import into another?
If you had a serialization class/function (e.g. JSON-like) and an API/method to store/retrieve, then I could apply the proper FSMs in code as needed -- so that may be a reasonable item for a request list. I do not need Playmaker to generate code .. I really just need access to it as a giant object/array or class structure.
Thanks for creating such a useful tool -- you are certainly on the right track.
Regards,
Jason