Top Down Movement Doesnt show movment animation

How do i make my player character with the top down behavior move with the sprite based animations. Here is my event sheet:

Here my my behavior panel

Please help!

I haven’t used top down behavior but from my previous experience with stuck animations, here are the things I did:

I changed the names of the image files to have their numbers match the animation frame number just in case they didn’t match.
Like, “animation0.png”, “animation1.png”, “animation2.png”… and so on. I was thinking those would correspond better in accordance with the animation frames in the game project. Although I’m not sure if those actually helped, just throwing it out there.

Along with that I followed ZeroX4’s method to set the animation frame to 0 whenever it is called.
Also, if the animation is supposed to loop, there is a checkbox to make it loop.

Here is a picture of ZeroX4’s method:
5548dd4384f43127de23bad8eed8326e7bbabe23_2_690x120

none of the methods work in my case

What is your question? You have trouble changing the animation, or trouble moving the character?
If its the animation, i would first test it without using the timer as dependency.

the character is moving but without the associated animation, like walk sequences!

I think it’s probably the series of “Or” conditions at the bottom of your events. If any of those are true, then animation will just revert to “idleshakti”.

Like if you pressed Left key, it goes, “walkleftshakti”
But then the other keys aren’t pressed. So the Right, Up, and Down, key are all released. Hence the animation goes right back to “idleshakti”.

Perhaps you might consider changing it to an “And” condition instead and include all the direction keys. That way if any one of them is pressed, it returns false, but if none is pressed, it returns true.
Also on another note, if you’re gonna use the “Or” condition, you can put all the subconditions under just one iteration of “Or”. I might be wrong but that’s how I’ve been doing it… Anyway, if it works, just stick with it.

None of the two approaches worked for me. Any other ideas or better previously contextually successful approaches?

Uhm… Looking through your events, the other possible thing I could guess would be the timer. How often does the timer reset? And then the trigger once for the variable.

Maybe separate the creation of the Shakti object from the change in animation? After the variable has been triggered, the sub-events would only work once as well.

It might be better to attach the animation change to the movement events.
Like,
If Left key is pressed – move object to the left
then a sub-event if the variable PlayerName = “Shakti”, trigger once – change animation
Repeat for each move button.

If that doesn’t work, I’m not sure what else. We’d have to wait for a pro to come along.

that doesnt work either!

i am thinking of simply copying the player character from the sample top down rpg game and see if that works

Alright. I’ve been looking into the top down movement behavior. You could use the conditions from it in order to change the animation rather than checking for key presses, since it does that already anyway.

So, maybe try to disable the key press conditions (for now).
Create a new, separate condition using top down behavior.

Condition:
If variable PlayerName = “Shakti” (this is a separate one from the creation event)
subcondition:
If player is moving
subcondition:
Angle of movement of player is 270, tolerance (10 or smt, idk)
trigger once

Action: change animation to “walkfrontshakti”

—create subconditions for each direction, 0, 90, and 180 under “If player is moving”.

Also create a subcondition for when player is not moving and set animation to “idleshakti”. This will go below the primary condition that has the variable PlayerName.
Test it out. If it works, you may delete the key press events.
I’m not sure if you can use the “Angle of movement of player…” on it’s own without the “Player is moving” one, but you can go experiment with those as well.

are you referring to the activate top-down behavior action, sorry if i sound stupid, all this trial and failure has got me really confused!

Ah sure, that could very well work since it’s already set up. Simplicity is best I suppose.

let me try this out as well, it doesnt hurt to learn new things

Nah, it’s a learning experience for the both of us. lol.
Anyway, it would probably look something like this:

I haven’t tested it yet, since I haven’t set up animations for it.
And I’m not sure if i got the angles right… but i’m sure you can figure that out.

edit: Okay, I just tested it. It works for me. Though you might want to adjust the tolerance value according to your needs.

it still doesnt work for me, im attaching the screenshots of the entire event sheet, i guess there are some conflicts im missing.

anyway, loads of thanks for helping me out

Ah I think it’s that part that says,
The text of the global variable PlayerName = “Shakti”

Make a new one of that. So it’s a separate event from where you create object shakti.
Remove the trigger once in the new event. And the create object shakti will only be in the first event but not in the new event.
The “is moving” and “is not moving” conditions are to be placed as subconditions for the new event.

Something like this:
There is an event for creating the object shakti and is triggered once,
and there is another event to check for movement which would always return true for everytime the player moves.

Now, it works for me too, thanks buddy! :slight_smile:

Alright! Nice. Good luck, sera!

Sorry, for reopening this thread but i added a player select feature to my WIP and the player movement animations have stopped working again. But theres more to it:

here you can see the player DOES do a quick set of animations in all directions before dumbing down to an unidirectional sprite frame.

Heres the eventsheet

All help will be appreciated!