This might sound advanced to ask for this but the reason why I like to know this answer whatever it may be is because I am currently working on a short game for a game jam that is going on right now, such as ITCH.IO's Low Rez Game Jam and the thought in mind I'd like to know is how can I make a secondary object follow a primary object in coding?
This was done on some classical games. For example:
Paper Mario - Mario's companions follow Mario by a queue system that mimics Mario's Controls, position, and jumps.
or
Gradius - Where the first enemies of each stage acts like a worm but following the primary leader before it gets destroyed and lets the next enemy in line take the lead and letting the secondary objects follow it?
Does anybody know how this can be done in GDScript? If not, well then I guess it was worth asking...