MZ Soft animation of movement problem

I have bound many images to variable values that change when pressing movement keys. There is a problem with diagonal movement, it works, but the animation does not start.

Usually I find a bug sooner or later, but I really did not expect such behavior. No wonder, I do not know how to code.

Pressing up or left starts the animation up or left, but when pressing both keys, only the second and third lines are executed, unnecessary animations are turned off, but the up-left animation does not turn on.
1.png

Diagonal movement works through a plugin, but I do not understand how this can be a problem, two simultaneous presses as a condition can be fulfilled (or executed idk sry).

All the images are in place, the variables have limiters, the switches are needed for the animation to fade out, in short, I do not know what the problem is.
2.png
It's hard to gauge what you are trying to do. I can see that you increase a counter depending on which button is being pressed, but I'm not understanding what you are trying to accomplish with the string of IF statements trying to show a different picture depending on the value accumulated in "up-left".

In your description you speak of animations, but in your screenshots there is only show-picture commands.

The only thing that I do notice at this time is that you add and subtract from variables, but the subsequent IF statements are references switches:

1.png


You show only part of the event, so it's difficult to tell for sure, but it would seem to me that for the IF statement I marked with the red arrow, ELSE is always true and therefore #0021 will always be set to 0, so none of the pictures from your second screenshot will ever show.

Also, to make sure more people can be of help to you, do consider changing the display language to ENGLISH before making screenshots. AFAICT there's only a handful of active people on here that can read Russian.
It's hard to gauge what you are trying to do. I can see that you increase a counter depending on which button is being pressed, but I'm not understanding what you are trying to accomplish with the string of IF statements trying to show a different picture depending on the value accumulated in "up-left".

In your description you speak of animations, but in your screenshots there is only show-picture commands.

The only thing that I do notice at this time is that you add and subtract from variables, but the subsequent IF statements are references switches:

View attachment 349191

You show only part of the event, so it's difficult to tell for sure, but it would seem to me that for the IF statement I marked with the red arrow, ELSE is always true and therefore #0021 will always be set to 0, so none of the pictures from your second screenshot will ever show.

Also, to make sure more people can be of help to you, do consider changing the display language to ENGLISH before making screenshots. AFAICT there's only a handful of active people on here that can read Russian.
Thanks for the answer. The "is 'up-left' pressed" switch is only enabled when the "up-left pressed" variable is greater than 6. This is the limit, because there are only six images in the animation. The show-image command depends on the values of the variables, which change depending on the duration of the button presses, creating the animation. I don't know what else to call the rapidly changing images in this context, which should create the impression that there is movement. After two lines of my post, the video example was posted at all?

I understand about the language, I edited it.

Here's everything that's in this event that concerns this thing:
◆If:'right' pressed > 5
◆Control Switches:#0021 is 'right' pressed = ON
◆
:End
◆If:'right' pressed = 0
◆Control Switches:#0021 is 'right' pressed = OFF
◆
:End
◆If:'left' pressed > 5
◆Control Switches:#0022 is 'left' pressed = ON
◆
:End
◆If:'left' pressed = 0
◆Control Switches:#0022 is 'left' pressed = OFF
◆
:End
◆If:'up' pressed > 5
◆Control Switches:#0023 is 'up' pressed = ON
◆
:End
◆If:'up' pressed = 0
◆Control Switches:#0023 is 'up' pressed = OFF
◆
:End
◆If:'down' pressed > 5
◆Control Switches:#0024 is 'down' pressed = ON
◆
:End
◆If:'down' pressed = 0
◆Control Switches:#0024 is 'down' pressed = OFF
◆
:End
◆If:'up-left' pressed > 5
◆Control Switches:#0025 is 'up-left' pressed = ON
◆
:End
◆If:'up-left' pressed = 0
◆Control Switches:#0025 is 'up-left' pressed = OFF
◆
:End
◆If:'up-right' pressed > 5
◆Control Switches:#0026 is 'up-right' pressed = ON
◆
:End
◆If:'up-right' pressed = 0
◆Control Switches:#0026 is 'up-right' pressed = OFF
◆
:End
◆If:'down-left' pressed > 5
◆Control Switches:#0027 is 'down-left' pressed = ON
◆
:End
◆If:'down-left' pressed = 0
◆Control Switches:#0027 is 'down-left' pressed = OFF
◆
:End
◆If:'down-right' pressed > 5
◆Control Switches:#0028 is 'down-right' pressed = ON
◆
:End
◆If:'down-right' pressed = 0
◆Control Switches:#0028 is 'down-right' pressed = OFF
◆
:End
◆If:Button
is being pressed
◆Control Variables:#0017 'right' pressed += 1
◆
:Else
◆If:is 'right' pressed is ON
◆Control Variables:#0017 'right' pressed -= 1
◆
:Else
◆Control Variables:#0017 'right' pressed = 0
◆
:End
◆
:End
◆If:Button
is being pressed
◆Control Variables:#0018 'left' pressed += 1
◆
:Else
◆If:is 'left' pressed is ON
◆Control Variables:#0018 'left' pressed -= 1
◆
:Else
◆Control Variables:#0018 'left' pressed = 0
◆
:End
◆
:End
◆If:Button [Up] is being pressed
◆Control Variables:#0019 'up' pressed += 1
◆If:Button
is being pressed
◆Control Variables:#0021 'up-left' pressed += 1
◆Control Variables:#0018 'left' pressed -= 2
◆Control Variables:#0019 'up' pressed -= 2
◆If:is 'up-left' pressed is ON
◆Control Variables:#0021 'up-left' pressed -= 1
◆
:Else
◆Control Variables:#0021 'up-left' pressed = 0
◆
:End
◆
:End
◆
:Else
◆If:is 'up' pressed is ON
◆Control Variables:#0019 'up' pressed -= 1
◆
:Else
◆Control Variables:#0019 'up' pressed = 0
◆
:End
◆
:End
◆If:Button [Down] is being pressed
◆Control Variables:#0020 'down' pressed += 1
◆
:Else
◆If:is 'down' pressed is ON
◆Control Variables:#0020 'down' pressed -= 1
◆
:Else
◆Control Variables:#0020 'down' pressed = 0
◆
:End
◆If:Button
is being pressed
◆
:End
◆If:Button
is being pressed
◆
:End
◆
:End
◆If:'left' pressed = 1
◆Show Picture:#40, cross-left-fade1, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'left' pressed = 2
◆Show Picture:#40, cross-left-fade2, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'left' pressed = 3
◆Show Picture:#40, cross-left-fade3, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'left' pressed = 4
◆Show Picture:#40, cross-left-fade4, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'left' pressed = 5
◆Show Picture:#40, cross-left-fade5, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'left' pressed > 5
◆Show Picture:#40, cross-left, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'right' pressed = 1
◆Show Picture:#40, cross-right-fade1, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'right' pressed = 2
◆Show Picture:#40, cross-right-fade2, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'right' pressed = 3
◆Show Picture:#40, cross-right-fade3, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'right' pressed = 4
◆Show Picture:#40, cross-right-fade4, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'right' pressed = 5
◆Show Picture:#40, cross-right-fade5, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'right' pressed > 5
◆Show Picture:#40, cross-right, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up' pressed = 1
◆Show Picture:#40, cross-up-fade1, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up' pressed = 2
◆Show Picture:#40, cross-up-fade2, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up' pressed = 3
◆Show Picture:#40, cross-up-fade3, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up' pressed = 4
◆Show Picture:#40, cross-up-fade4, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up' pressed = 5
◆Show Picture:#40, cross-up-fade5, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up' pressed > 5
◆Show Picture:#40, cross-up, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'down' pressed = 1
◆Show Picture:#40, cross-down-fade1, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'down' pressed = 2
◆Show Picture:#40, cross-down-fade2, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'down' pressed = 3
◆Show Picture:#40, cross-down-fade3, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'down' pressed = 4
◆Show Picture:#40, cross-down-fade4, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'down' pressed = 5
◆Show Picture:#40, cross-down-fade5, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'down' pressed > 5
◆Show Picture:#40, cross-down, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up-left' pressed = 1
◆Show Picture:#40, cross-up-left-fade1, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up-left' pressed = 2
◆Show Picture:#40, cross-up-left-fade2, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up-left' pressed = 3
◆Show Picture:#40, cross-up-left-fade3, Upper Left ({pavel x},{pavel y}), (100%,100%), 255, Normal
◆
:End
◆If:'up-left' pressed = 4
◆Show Picture:#40, cross-up-left-fade4, Upper Left ({pavel x},{pavel y}), (100%,100%), 250, Normal
◆
:End
◆If:'up-left' pressed = 5
◆Show Picture:#40, cross-up-left-fade5, Upper Left ({pavel x},{pavel y}), (100%,100%), 250, Normal
◆
:End
◆If:'up-left' pressed > 5
◆Show Picture:#40, cross-up-left, Upper Left ({pavel x},{pavel y}), (100%,100%), 250, Normal
◆
:End​
So... to be honest, I'm not sure why you would want to do it this way. The reason may be because I'm not understanding what you want to do. Using Show Picture to simulate animation doesn't seem like a sensible thing to do.

So perhaps try to explain what you wish to do, maybe share the five cross images that you want to function as animation.
So... to be honest, I'm not sure why you would want to do it this way. The reason may be because I'm not understanding what you want to do. Using Show Picture to simulate animation doesn't seem like a sensible thing to do.

So perhaps try to explain what you wish to do, maybe share the five cross images that you want to function as animation.

Look at this.

I think it's clear that the cursor is not behaving as it should. It should work diagonally the same way as right left up down. Everything is fine with the cursor images, I checked them ten times, and there's nothing to check there.

So... to be honest, I'm not sure why you would want to do it this way. The reason may be because I'm not understanding what you want to do. Using Show Picture to simulate animation doesn't seem like a sensible thing to do.

So perhaps try to explain what you wish to do, maybe share the five cross images that you want to function as animation.
I use show picture because it has more fps and more control. More pixels, although it's not as important to me as the squareness of the map. I'm basically making a mini-game or let's say a mechanic where you have to track something underwater and all that, in short.

It's hard to gauge what you are trying to do. I can see that you increase a counter depending on which button is being pressed, but I'm not understanding what you are trying to accomplish with the string of IF statements trying to show a different picture depending on the value accumulated in "up-left".

In your description you speak of animations, but in your screenshots there is only show-picture commands.

The only thing that I do notice at this time is that you add and subtract from variables, but the subsequent IF statements are references switches:

View attachment 349191

You show only part of the event, so it's difficult to tell for sure, but it would seem to me that for the IF statement I marked with the red arrow, ELSE is always true and therefore #0021 will always be set to 0, so none of the pictures from your second screenshot will ever show.

Also, to make sure more people can be of help to you, do consider changing the display language to ENGLISH before making screenshots. AFAICT there's only a handful of active people on here that can read Russian.
I'm super dumb, I put that switch in ELSE and the fade in started working but not the fade out, and I'm starting to understand why

Original thread: https://forums.rpgmakerweb.com/threads/soft-animation-of-movement-problem.179985/