[Solved] Scrolling test gone wrong

Status
Not open for further replies.

Artille

Veteran
Veteran
Joined
Jul 23, 2012
Messages
47
Reaction score
33
First Language
French
Primarily Uses
RMMZ
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.

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?
 

JohnDoeNews

Veteran
Veteran
Joined
Apr 25, 2017
Messages
215
Reaction score
124
First Language
Dutch
Primarily Uses
RMMV
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...
 

Artille

Veteran
Veteran
Joined
Jul 23, 2012
Messages
47
Reaction score
33
First Language
French
Primarily Uses
RMMZ
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?
 

JohnDoeNews

Veteran
Veteran
Joined
Apr 25, 2017
Messages
215
Reaction score
124
First Language
Dutch
Primarily Uses
RMMV
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.)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,041
Reaction score
5,705
First Language
English
Primarily Uses
RMVXA
Moved to RPG Maker MZ Support. Game Mechanics Design is for design (not implementation) discussions that don't relate to any engine in particular.
 

Artille

Veteran
Veteran
Joined
Jul 23, 2012
Messages
47
Reaction score
33
First Language
French
Primarily Uses
RMMZ
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.
 

Artille

Veteran
Veteran
Joined
Jul 23, 2012
Messages
47
Reaction score
33
First Language
French
Primarily Uses
RMMZ
My bad... I understood my problem. :kaoblush:

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 :
ScrollingTest2.png
It works the way it's supposed to. :D

PS : I found the dark theme! Much better. :kaopride:
 

JohnDoeNews

Veteran
Veteran
Joined
Apr 25, 2017
Messages
215
Reaction score
124
First Language
Dutch
Primarily Uses
RMMV
Oh, yeah that helps. :p I would never have been able to tell from the French version. :p
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,464
Reaction score
5,590
First Language
Dutch
Primarily Uses
RMXP

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.

 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,041
Reaction score
5,705
First Language
English
Primarily Uses
RMVXA
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".
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Sometimes you Just need to realise someone is beyond help... Still hard to walk away tho :(
100 Horror/Tragedy Sample Maps, Penguin Mech Sprite, & TileD Templates | RPG Maker News #70

Continuing working on abs. So far I have done the workout twice. I am excited to see the results after a couple of weeks. How is everyone doing? :)
MZ: oh boy imma work today
Me, excited: Really?
MZ, doesn't do what I tell It too
Me: I Thought-
MZ: I am Working!
Oof, this "side project" of mine is starting to get as complex as a VS plugin, at least as far as plugin parameters are concerned. I think I now understand why a plugin like this doesn't already exist(that I know of). Learning a lot while trying to make it work though!

Forum statistics

Threads
112,222
Messages
1,066,648
Members
145,827
Latest member
blickr_austria
Top