Follow along a spline based on distance to player

Maybe have a boolean that checks “distance to actor” from player to AI on spline, and if it is greater than a certain distance have it set AI location to whatever the current “location at distance along spline” is indefinitely until the player comes close enough then it can continue to execute through the timeline to increase the distance along spline location.

Hi!

Im trying to make actor that guides player trough one part of the game so that when player is close enough it will move along a spline and if player is far it stops and wait till player is close enough again and it would go further.

I got it already to move along a path made with a spline but currently it’s working on timeline which means that it either goes once till it’s in the distance it will start waiting but wont srart again or it would start from beginning of the path.

What would be the correct way to make it work as intended?

Thanks for advance!