I was thinking about this same thing(the ability to jump onto a path at any point, and reverse and change speed I was searching for terms like dynamic paths and didn't see anything).
And the best i could come up is this:

have an actor follow a path (for example of 50 frames) then at each step, record that actor's location. (i guess this can be done outside of the view).
when actor finishes that path, have her call a method to record this path's size.
Then once we have this recorded path with all the locations,
we can then tell others actors to follow the recorded path

with new framesize which allows for speed

specify which frame we want to jump on that recorded path (relative to the new specified framesize)

and a direction to follow (1 means forward, -1 means backward, 0 means stop)

similar to changing Path to none, we can detach the actor from following the recorded path
here's a ged demo of that.
all the recording and follow paths are in the _path.c (a global script).
functions that can be used are
pathClear(); // maybe call it from view Create Actor to initialize everything to zeroes
pathRecordStep(int whichPath); // to be called from the recorder's Draw Actor's event with an index
pathFinish(int whichPath); // to be called from the recorder's Path Finish event with the same index
for example, set an actor to start out with a path that have this in the Draw Actor
- Code: Select all
pathRecordStep(0,x,y );
0 is the index we're recording it to, currently i just have 100 in there (change it to anything you wish).
then in Path Finish have
- Code: Select all
pathFinish(0);
once we have this recorded path.
we can use
pathFollow(int whichPath, int startStep, int frames, char cloneName[], int pathDirection)
for example in another actor's Draw Actor event, have it call
- Code: Select all
pathFollow(0, 30, 120, (char*)clonename, 1, &x, &y);
to follow the recorded path
at a quarter the way
at 120 frames, and 1 indicates forward
or have it call
- Code: Select all
pathFollow(0, 3, 6, (char*)clonename, -1, &x, &y);
to follow the same recorded path (index 0) with only 6 frames and in the opposite direction.
so the last parameter can be 1,0, or -1 so we can have a parameter.
and another method is detachFollower(char clonename[]);
have it call from wherever you want to remove it from the follower's list
- Code: Select all
detachFollower((char*)clonename);
just see the code. (i keep changing it).
Feel free to edit as you see fit or please do share, if you find a better way.
ponder: if the pathFollow method can be called from Create Actor event
instead of in calling it in the Draw Actor event and then create some timer to move the actor that's been added (this would seem cleaner but i think that's for another day).