# [VXA] moving forward

#### darkspot

##### Villager
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?

#### Mhin Ra

##### Veteran
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:

And then a parallel event that looks like this:

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

#### darkspot

##### Villager
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!

### Latest Profile Posts

We are truly intellectuals.
Without using violence without weapons
Our group has as many as 1.3 million people and more than 1 hundred thousand talks.
We gathered in an hour, more than 4.5 Half a hundred thousand

I got a Sword.
I got an Axe.
I got two Swords.
Nothing to see here, just walking with my dog.
I haven’t worked on my game in a while. Tomorrow might be the day.
*squeals*

I've been experimenting with improved memory management again, which allowed me to include items to increase player path length. These are both 44 grid spaces long, and stable.
I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!