Top Down Movement Doesnt show movment animation

Nope, that doesnt do the trick, :frowning_face:

I just noticed, you have only two sets of animations, 0 and 1? Also are they set to “loop”?

the 0 is the walking animation and 1 is idle, it isnt set to loop, let me check if that works!

now, the player is constantly moving in all directions, should i try to separate the animations direction wise?

Sure, try it. Although, pardon me but I kind of don’t get how that works… Like facing right (0 degrees), and facing left (180 degrees) are both using the same set of animations?

at present, yes, is it stupid ol’ me, it just might be

Nope dividing the animation for each direction doesnt work. More specifically a setup where animation 0 is walkFront, 1 is walkBack and 2 is idle, the following eventsheet wont work!

I’m not sure about your process but I would recommend using set animation by name whenever possible. Set animation to “left” is much easier to understand than set animation to 1.

here is the animation events with more clarity

Much easier to read. What happens? I would add the **angle of movement ** to either the debugger or a text object. Make sure the numbers are what you expect. You can do the same for the variables.

Sometimes angles are 0 to 360.Other times, - 180 to 180. I would just check it to be sure. (You can use the debugger for variables but it doesn’t show you the value in different times. It might be different values at different times or events.)

I like to add a **play sound on channel ** action as a way to be sure that an action is being triggered.

Put it in the first conditional event, if it works then move it down lower.

I know this sounds dumb but a text box with the angle of movement as the variable text wont show anything. This is the first time im using the debugger and apparently the player angle at all times remains 0 as the following video will show:

Can you help me get unstuck?

Unfortunately, the debugger isn’t real-time. You need to press [refresh] each time. You can add a text object to see the number in real-time or use the debugger’s log a message action under [other actions]

If the text object isn’t showing anything then it’s either not on screen, there’s a typo or there’s a condition that’s not triggering. It doesn’t need a condition.

image

I tried it. It gives a number from 0 to 360. Although, for some reason I’m getting a -90 after releasing the up key.

ScreenRecorderProject83

This extension could help:
https://wiki.gdevelop.io/gdevelop5/extensions/top-down-movement-animator/

1 Like

The extension didn’t work at least in my case, however the real time angle text did show up and everything seems to be fine!

there is a potential bug, walk up or back switches between angle values of -90 and 270 where it should only be 270, does that mean anything?

Yes, :), now it works, i had to get rid of the condition checking if the player was anupam and get my angles and directions right. Heres the eventsheet for reference!

1 Like