How do I make a player object follow a spline which will dynamically change during gameplay?

Hello everyone. Today my problem is as you see in the question above: How do I make a player object follow a spline which will dynamically change during gameplay?

To elaborate a bit on my issue, let’s look at what I have already. What I have currently is the ability to drop “Node” actors into a scene which each have a designated number on them starting from 0 and incrementally getting larger. These numbers represent node positions. When I start the game, the spline I have in my game will acquire all the nodes that I have in the level and create spline points at each node accordingly which in turn draws a complete spline. It looks something like this: (Ignore the out of order node numbers, it’s a bug I’ve since fixed)

After the game is finished drawing the spline, the player will start moving along the spline I have drawn. The tutorial I followed is mainly this one:

Now comes the problem I have. The player can move along the enclosed spline perfectly fine as of now, but I want to add the function to be able to designate the player to “break off” from the loop and head to a new set of nodes.

For example, the player may travel along some nodes, encounter a boss, start circling the boss via nodes surrounding it, and then break off from that loop of nodes to go along another path once the boss is dead.

I have tried several ideas to accomplish this elegantly. One of the methods I tried is assigning “Next Node to Travel to” on each of the nodes so that they can know which node to travel to next after it reaches this one. This number can be adjusted dynamically through external scripts to enable “breaking the loop”. This is intended to be accomplished by destroying the whole spline when it reaches a node and redrawing it based on where the next target node is meant to be.

However the main problem that happened with this is that the ship will teleport wildly whenever I destroy and recreate the spline path and doesn’t at all adhere to where I want it to go.

So does anyone perhaps have any other idea on how I could achieve the effect I want. Any help is welcome!