I want to transform a current implementation of state machine and use the new plugins API.
It works like this:
- StateNode 1
- StateNode 2
- StateNode 3
In the StateControllerNode you can define the target node you want to control, so you can get access to it by using just a variable from the state nodes.
In the StateNode you can create a custom script wich will extend from StateNode. Inside you get access to callback functions like enterstate(), exitstate(), process_state(delta), etc.
I checked the current plugin demos, but the closest thing to this is the HeartNode demo, but in that plugin the script that is attached to the node is always present, and is a direct reference to the script .gd file, so if the user changes the content of the node's script, all instances of the node will also be changed.
I want to have a "virtual" ScriptNode class with the base implementation that users can extend and override.
I know this is possible by writing a custom C++ module, but I want to do it using the plugin system.