[Solved] Scrolling test gone wrong

Hello,

I'm testing some scrolling experience, and I'm having an issue with the utter basics that is the velocity X.
I know the principals of using Velocity X and Y to move an object (or image) through eventing, however I seem to have an issue and I can't lay my finger on it.

Spoiler: Script
ScrollingTest.png

So I thought the simpliest way to do this is to add a pos X and pos Y, then increment or decrement Velocity X base on player input, then update the position with that velocity.
Works wonders, however I need something to stop the player to move when no input is given, so I thought I'd use a switch to determine if the player is pressing something or not, when he is not, reverse the velocity untill it reach 0.

Now, this works just fine, except I can't move right anymore.
If I take the "NoInput" controller part away, I can move left or right just fine, so I'm guessing the issue is from the NoInput condition, but it works just fine when you are going left, but going right is impossible.

I tried different methods, but I can't seem to fix the issue of not being able to move right.

Anyone has an idea what I'm doing wrong?
I'd love to help. Figuring this kind of bugs out is kinds of my thing. But it is too confusing that your RPG maker is not set in English.

Is that a loop in there? I think I see a loop, but no loop ending... Is that right? This would be why your player can not walk. Unless this is a parallel event...
Boucle is indeed loop.

The loop ends after the 1 frame next to the update.
"Répéter ci-dessus" means Repeat.

The event is set in parrallel mode since it requires to run indefinitely (for now at least).

I'm not sure a break loop would help, because it would mean I need to call the event again if I want to update the position.

Is there a way to change to English mode without reinstalling the software?
Nah, if it is a parallel event, then the loop is not a problem. (However a 1 frame pause between runs, is very very short. It will try to run this 60 times a second. This is not the issue here, though...)

Sorry, but then I don't know what the problem is. And no... As far as I know, you can't switch the language without re-install. (Language of RPG maker that is... Re-installing will not affect your project in any way.)
Moved to RPG Maker MZ Support. Game Mechanics Design is for design (not implementation) discussions that don't relate to any engine in particular.
Moved to RPG Maker MZ Support. Game Mechanics Design is for design (not implementation) discussions that don't relate to any engine in particular.
This is confusing xD

This scrolling test is not implemented or engine dependend, but I guess it was the wrong forum. 🙁

Nah, if it is a parallel event, then the loop is not a problem. (However a 1 frame pause between runs, is very very short. It will try to run this 60 times a second. This is not the issue here, though...)

Sorry, but then I don't know what the problem is. And no... As far as I know, you can't switch the language without re-install. (Language of RPG maker that is... Re-installing will not affect your project in any way.)

Ok, I'll try and set it in English then, some translations are confusing, even to me, in French anyway. ^^

Thanks for trying to help, as I'm clueless to why it works for left but not for right, since it's litteraly the same but with negative/positive values.

There is also nothing (I believe) that prevents from reading that condition(NoInput) only when no input is given, meaning as long as there is some input it shouldn't prevent from incrementing velocity X, yet somehow it does.
My bad... I understood my problem. 😊

So, the way the code is read, is simple but I didn't think this through.

The error comes from the second condition "If left is pressed then..., else NoInput = ON"
Since I'm pressing Right, the condition "If left is pressed then..., else NoInput = ON" is run, activating the switch from the left condition branch thus preventing from incrementing velocity X when right is pressed.

The same would happen to left if I switched and put left on top of right.

Once this is fixed :
Spoiler: Image
ScrollingTest2.png
It works the way it's supposed to. 😀

PS : I found the dark theme! Much better. 😤
Oh, yeah that helps. 😛 I would never have been able to tell from the French version. 😛

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

This is confusing xD

This scrolling test is not implemented or engine dependend, but I guess it was the wrong forum. 🙁
@Artille I'm very glad you were able to solve the problem!! Just to clarify, the support boards (the correct place I moved your thread) is for answering "how-to" questions like fixing eventing issues, using the database, or any other mysterious issue where the game is not doing what you think it should do and you don't believe a plugin is to blame. That's what I meant by implementation. The Game Mechanics Design board is for design discussion that isn't even specific to RPG Maker at all, such as "what is a good a random encounter rate in an RPG", "can you give me tips for balancing the game economy", "what can I use to make minigames feel more rewarding", or "let's compare different elemental weakness/resist mechanics".

Original thread: https://forums.rpgmakerweb.com/threads/solved-scrolling-test-gone-wrong.132952/