How to make a character start following a spline at the beginning of it, and stop following it at the end?

I want to create a system where the character is free to move around as they wish in the open world, but when they hit a trigger box (or something similar) they start following a spline based predetermined path way until one of three things happens:

  1. the character jumps
  2. the character stops walking
  3. they reach the other end of the spline
    it also needs to be able to enter an exit from both sides of the spline pathway.
    please help, I cant find much documentation about this