[VXA] moving forward

I'm making this racing segment, and I want the player to keep moving forward automatically and only change direction with controls, how do I achieve this?
I did a skiing segment perhaps like what you're thinking. I don't know how elegant this solution is, but I had an activator event that did this:

1594843112003.png


And then a parallel event that looks like this:

1594843195521.png


That only handles :LEFT; you'd want to make a similar thing for :RIGHT. Note that the above makes the player jump down and left if they can keep moving down (that's self switch 85). Otherwise, it has them move left (self switch 86).

The big script statement is essentially trying to figure out whether the player can move left+down or down+left (so it's a passability check to ensure they don't go into a square that's impassable). The 6 and 8 are directions; they use the numpad values for directions, so (8 = up, 6 = right, 4 = left, 2 = down).
You can tweak all those behaviors if you want something different.

However, when running this the player essentially only goes left or right as I've defined and cannot speed up or slow down. You could, of course, set their speed to whatever to control how fast they go.

Hope this helps a bit 🙂
I did a skiing segment perhaps like what you're thinking. I don't know how elegant this solution is, but I had an activator event that did this:

View attachment 151480

And then a parallel event that looks like this:

View attachment 151481

That only handles :LEFT; you'd want to make a similar thing for :RIGHT. Note that the above makes the player jump down and left if they can keep moving down (that's self switch 85). Otherwise, it has them move left (self switch 86).

The big script statement is essentially trying to figure out whether the player can move left+down or down+left (so it's a passability check to ensure they don't go into a square that's impassable). The 6 and 8 are directions; they use the numpad values for directions, so (8 = up, 6 = right, 4 = left, 2 = down).
You can tweak all those behaviors if you want something different.

However, when running this the player essentially only goes left or right as I've defined and cannot speed up or slow down. You could, of course, set their speed to whatever to control how fast they go.

Hope this helps a bit 🙂
Thank you so much, that really helps a lot!

Original thread: https://forums.rpgmakerweb.com/threads/vxa-moving-forward.124055/