Well, having never made a robot fighting game, or really any game that uses visual scripting, I can only make some assumptions on how to go about it.
First you will need to make some sort of visual programming language.
You may be able to use VisualScript (included in Godot 3.0) though it’s probably too broad for your needs. If you can use VisualScript, then all you should need to do is expose a bunch of functions specific to controlling the robots, and then let Godot do the rest.
If you cannot use VisualScript, then I would suggest deciding on how you want to make your custom visual scripting language. I would look into state machines, and then decide what flow structure you want. If you want branching visual scripting (like Godot’s visual scripting language), then I would look into using a Dictionary and generic states that you extend to give functionality. If you want queue based visual scripting (akin to Scratch’s visual scripting language) then I would use a list/array and generic states that you extend to give functionality.
Granted, I’ve never made a visual programming language, so I’m not 100% on how to go about this, but that is what I would look into.
The next step would be making a bunch of states (chunks of code) that do very simple, but specific parts of what you are wanting the player to be able to do.
Some example states could be moving a robot forward, rotating a robot clockwise/counterclockwise, making a robot jump, making a robot activate booster jets, etc.
Once you have each individual state more or less written out, then you need to make sure they work with the visual scripting language you wrote.
Once again, I’m not sure on the complexities involved in this, nor have I done it before.
Finally, the last broad step would be making a UI so the player can make their own scripts in your visual language. This greatly depends on how you want to setup your visual scripting langauge, and how complicated you want to make it.
Thankfully, I think this step would be much easier in comparison to the other steps above.
Overal, I would highly suggest looking at state machines, as I would think it would be one of the most important parts of making a programmable game.
The way I learned how to make state machines was to make a RPG dialog system. What really made it click for me on how to make a state machine was to view it like a choose your own adventure book, so maybe that will help?
I have not gone through this, but maybe this article from Medium will help explain? Apparently it shows the basics of state machines in computer science, so it should be fairly easy to apply the concepts to GDScript.
Hopefully this helps and gives you some ideas :smile: