"I think the best way to define grindable rails is point entities that define the rails like path_track does. When a player comes close enough you snap them to the rail and move them relative to the lines between points."
This. Except I had an idea about checking whether the player is touching the line between the two points. "Close enough" is a bit harder to do.
"Speaking of triggers, I believe with zhlt_noclip they wouldn't work because clips are their essence."
I was talking about the illusionaries.
And here's the concept.
rs1 checks traces between pt1 and pt2. If the player, for example, jumps on it, then rs1 will take that player and check the velocity. It'll determine the direction of movement according to the velocity, and accordingly, it'll snap the player to that traceline, and move the player smoothly to either pt1, or pt2, depending on the direction.
As you can see, the minimum keyvalues required for the entity to work are the start and end path entity. It's quite simple.
Now, in this case, three things can happen:
1. Player jumps off the rail
This is really simple. Check pev->buttons and dismount the player, maybe add a number like 50 to
velocity.z
.
2. Player arrives at pt1
Same thing as case 1. We have no neighbouring railslide node, so dismount the player (also, don't forget to 'lose' the pointer that points to the player entity, cuz' the player no longer belongs to rs1).
3. Player arrives at pt2
This is where things get interesting. The entity loses control of the player, and tells rs2 to handle the player. Then rs2 will move the player to rs3, and if the player reaches pt3, they will be dismounted.
Now, I believe that this specific way won't work for multiplayer. :/
It'd take some extra work to optimise this for multiplayer, since you have to take multiple players into account and thus somehow point to multiple entities at once, usually done with a for loop iterating until it hits the max player count.
On another thought, maybe you could just take one func_railslide and let it take on an entire group of path entities? Kinda like a func_train.