Moving character while it moves in parallel event.

Basicly what i want is for parallel 1 to constantly move character right, player able to move it up and down (while moving right is still active), and not being able to do anything else.

And i fail on second step already, since the parallel movement blocks controls entirely even if i uncheck "wait for completion".
1743287342494.png

I also tried to make it just right, right right without repeat. Does not work.
So i tried to make a second event that's also parallel and will move player in direction of up and down inputs.
1743287398628.png
That also do not work, and now i am out of ideas. Maybe you got any?
Maybe it would make sense to make just a single parallel event similar to your second "SKIPCHECK" one with a structure like this?

if Button Down {
Move Down
} else {
if Button Up {
Move Up
} else {
Move Right
}
}

This way the right movement will occur only if neither up or down are pressed.
This might make the controls not very responsive, but you could also fix that by adding some switches.

if Button Down {
Switch Down ON
} else {
if Button Up {
Switch Up ON
}
}

if Switch Down {
Move Down
Switch Up OFF
Switch Down OFF
} else {
if Switch Up {
Move Up
Switch Up OFF
Switch Down OFF
} else {
Move Right
}
}

This way the switches will remember the input that was made in-between movements.
That's assuming the above actually works, and I haven't tested it myself, so I don't know if it actually does, though.
Put it all in one event,
If player presses down -> move down (skip if cannot move)
If player presses up -> move up (skip if cannot move)
Then do move right (skip if cannot move)
Wait: 2

Parallel events already repeat every frame so no need for repeat being checked.
Maybe it would make sense to make just a single parallel event similar to your second "SKIPCHECK" one with a structure like this?

if Button Down {
Move Down
} else {
if Button Up {
Move Up
} else {
Move Right
}
}

This way the right movement will occur only if neither up or down are pressed.
This might make the controls not very responsive, but you could also fix that by adding some switches.

if Button Down {
Switch Down ON
} else {
if Button Up {
Switch Up ON
}
}

if Switch Down {
Move Down
Switch Up OFF
Switch Down OFF
} else {
if Switch Up {
Move Up
Switch Up OFF
Switch Down OFF
} else {
Move Right
}
}

This way the switches will remember the input that was made in-between movements.
That's assuming the above actually works, and I haven't tested it myself, so I don't know if it actually does, though.
Unexpected identifier.

Put it all in one event,
If player presses down -> move down (skip if cannot move)
If player presses up -> move up (skip if cannot move)
Then do move right (skip if cannot move)
Wait: 2

Parallel events already repeat every frame so no need for repeat being checked.
Like this?
1743320881993.png
Does not work as well.
Does not work as well.
because it's not exactly what you were told.

the problem is that each character can have only one move route. any following set move route command will overwrite that previous move route.

and since you set the last to repeat, it will usually be faster in overwriting the other set commands than any other input.
because it's not exactly what you were told.

the problem is that each character can have only one move route. any following set move route command will overwrite that previous move route.

and since you set the last to repeat, it will usually be faster in overwriting the other set commands than any other input.
1743348060095.png
Yes, it was my mistake, forgot to remove repeat. Still not working though.

Update: it starts working when i increase wait time to 20 frames. But that's a lot, so movement looks really laggy. Even if i change player's speed it does not seem to have much effect. Also if player presses move right as well, movement speed increases a bit, but i need stable movement speed.

Is there any workarounds? Like, move the player at stable speed by some kind of outside force instead of movement route?

My goal here is to create a level like the river where boat moves ahead and player can only steer it left and right.
My goal here is to create a level like the river where boat moves ahead and player can only steer it left and right.
then why take control per event at all?

This is usually done by only the river motion in a single parallel set move route, and the regular movement by keyboard in addition to that.
OK, it has the difference that the player can either reduce or speed up the move right by using the left/right keys, but that is usually less of a problem in such games.
OK, it has the difference that the player can either reduce or speed up the move right by using the left/right keys, but that is usually less of a problem in such games.
That, and coding entire river with many obstacles, some of them - also parallel, moving events, and putting all of that in a parallel event that also moves against the player seems like even harder challenge.
Also i will have an enemy chasing the player at constant speed, so it's essential for player to keep constant speed as well and do now slow down.
@ElvenNeko I didn't mean my answer to be used as code, just as a structure for the event's contents, using conditional statements like you're using right now.

Anyway, I think you can remove the wait at the end and instead, in the set movement route command, use "Wait for completion". This way the parallel event will wait exactly as long as a single step takes.

Like this (although, now that I tested it, the input still feels a little unresponsive, even with the fix using the switches):
1743376447951.png


Edit:
After a little bit of testing I found that the most responsive solution seems to look like this:
Have 2 separate parallel events,
Event 1 (for handling the input):
1743377799718.png


Event 2 (for movement):
1743377876584.png

Note that the movement routes for up and down are only "Skip", but the movement route for right is "Skip" and "Wait".
@ElvenNeko I didn't mean my answer to be used as code, just as a structure for the event's contents, using conditional statements like you're using right now.

Anyway, I think you can remove the wait at the end and instead, in the set movement route command, use "Wait for completion". This way the parallel event will wait exactly as long as a single step takes.

Like this (although, now that I tested it, the input still feels a little unresponsive, even with the fix using the switches):
View attachment 336038

Edit:
After a little bit of testing I found that the most responsive solution seems to look like this:
Have 2 separate parallel events,
Event 1 (for handling the input):
View attachment 336039

Event 2 (for movement):
View attachment 336040
Note that the movement routes for up and down are only "Skip", but the movement route for right is "Skip" and "Wait".
Thank you, this works a lot better, clevel solution with switches.

Still, face 2 problems -

1) Need to find a way to block forward movement input from the player.

2) The movement route speed change for the player for some reason has zero effect, even if i put it in parallel events. Due to that i am unable to somehow synch player movement with chasing event because it's either too fast or too slow.
2) The movement route speed change for the player for some reason has zero effect, even if i put it in parallel events.
that is a very bad idea - the speed change should be done once, not in every loop. And it needs to be done before the chase starts, because otherwise the set move commands from the chase might delete the speed change move route command before it can be executed.

as I already mentioned above each character can have only ONE move route, and setting another one erases the first no matter if it was already executed or not.

and if that doesn't help, show us how you set the speed
that is a very bad idea - the speed change should be done once, not in every loop. And it needs to be done before the chase starts, because otherwise the set move commands from the chase might delete the speed change move route command before it can be executed.

as I already mentioned above each character can have only ONE move route, and setting another one erases the first no matter if it was already executed or not.

and if that doesn't help, show us how you set the speed
1743423885565.png
I think it might be the order of events that's messing with the speed.
To make it work the autorun event that sets the speed needs to execute before the parallel event responsible for the movement runs.

Events run in the order of their IDs (from lowest to highest).
Seeing as the autorun event has ID 7 it executes after the parallel event with id 6 has already started and fails to set the speed, as the player is already controlled by another event.

To fix this you could put both the autorun event on the same event as the parallel one, but on a higher page, ensuring the autorun runs before the parallel event starts, like this:

1743461169584.png

1743461187835.png


As for blocking the forward movement, I'm not sure I understand.
Do you mean additional movement to the right or something else?
I think it might be the order of events that's messing with the speed.
To make it work the autorun event that sets the speed needs to execute before the parallel event responsible for the movement runs.

Events run in the order of their IDs (from lowest to highest).
Seeing as the autorun event has ID 7 it executes after the parallel event with id 6 has already started and fails to set the speed, as the player is already controlled by another event.

To fix this you could put both the autorun event on the same event as the parallel one, but on a higher page, ensuring the autorun runs before the parallel event starts, like this:

View attachment 336117
View attachment 336118

As for blocking the forward movement, I'm not sure I understand.
Do you mean additional movement to the right or something else?

Yes, you are correct, speed change is solved! Didn't knew that about event order.


And yes, i meant additional movement to the right (that increases player's speed). I would like to remove it at all to keep speed fixed. And left movement as well.

Or maybe block acsess to movement at all? The up and down movement are completed via switches anyway, so it should still work. But, unlike blocking menu there is no option for movement block. But it blocks automaticly during active event... But since events also take turns it means i am unable to block the input by getting autorun event stuck while the parallel one plays. I wonder if there is other way?
I couldn't reproduce the issue you were talking about, and then I realized I accidentally set the movement setting event to autorun instead of parallel 😀

1743552838423.png


But interestingly enough, that actually solves the issue.
An autorun event blocks the player's input, but doesn't stop parallel events from running, so if you use parallel events to control everything else in the scene this should work, and in my testing it seems to work just fine. 🙂

And yes, the events start in order, but parallel events still start and keep running even when there is another blocking event running at the same time (that's what makes them parallel in the first place).
I run into another issue, there is an event meant to displace the player if he steps on it while it's activated. It looks like this -
1745491359299.png


The problem that it does not work, and while i can assume that parallel movement part does not work due to other parallel movement active, i have no idea why teleport player command does not work.

Also, maybe there are some other ways to move player a step back?
I think that events triggered with Event Touch and Player Touch don't activate if the player character touches them through a movement route set from another event. They only seem to activate if the player touches them while they are actually in control of the character.

That's why it's usually a better idea to make the background around the player move instead of the player character themselves, like Andar said earlier.

The only other solution that comes to my mind right now would be to check the player's position in the parallel event and check if it matches the position where you want to make the player take a step back, and have them do that there instead of in a separate event.

Like this maybe?
1745533578739.png
I think that events triggered with Event Touch and Player Touch don't activate if the player character touches them through a movement route set from another event. They only seem to activate if the player touches them while they are actually in control of the character.

That's why it's usually a better idea to make the background around the player move instead of the player character themselves, like Andar said earlier.

The only other solution that comes to my mind right now would be to check the player's position in the parallel event and check if it matches the position where you want to make the player take a step back, and have them do that there instead of in a separate event.

Like this maybe?
View attachment 338552
It works! But i am not sure how exactly. They check player position, and if it's equals event 4's position, the movement happens, right?
So i can keep a single parallel event and add a lot of ifs there for all geyser event positions?
It works! But i am not sure how exactly. They check player position, and if it's equals event 4's position, the movement happens, right?
So i can keep a single parallel event and add a lot of ifs there for all geyser event positions?
Yes, the way it works is that during movement (in the parallel event), instead of triggering the event id 4 itself, the parallel event checks if the player is standing on top of it, and then takes a step back instead of forward.
Just keep in mind that the event id 4 does not actually get triggered in this way; everything is executed in the parallel event.

You could also remove the event id 4 and the Get Location Info command, and check the player x and y variables directly in the conditional statement, if you find that simpler, but either way it should work the same way.

Original thread: https://forums.rpgmakerweb.com/threads/moving-character-while-it-moves-in-parallel-event.176622/