[SOLVED]Problem changing Attack animation

So, every animation like walking jumping etc is working, but when it comes attack animation it’s not working. I mean when I push the attack button(AB) it’s only shows about millisecond that animation. I think it’s because it does another animations like walking when the player is on the floor etc. I made that it creates another object with attack animation when push AB and hide player when that happens and shows when its finished. I didn’t like the outcome.

I wonder if anyone have any good idea how it will work great?:slight_smile:

Ps. some pictures from the game



kuva1.png

As you said, I think the problem is that the attack animation is immediately changed into walking animation.
You can try to use inverted conditions in order to only play walking animation when the player is not attacking.


In this example, the Space key is the attack key. The condition in the 2nd event means “If Space key is not pressed”.

If this solution doesn’t work, can you link your project (with images) or take screenshots of your events ?

That invert condition thing didn’t work. I think I have to change those events that Player is on the floor etc…
There’s my player movement events. It’s quite a messy right now and I’ll remove useless events later. I hope it’s not bother you!

Thank you!

ps. Here you can download and try it out!: https://www.dropbox.com/s/mi7v8rp9r7d680l/Superhero.rar?dl=0
There might be many bugs like scaling problem etc. But the process is veeeeeeeeeery early phase. Only placeholder enemies and only one stage which isn’t ready at all.
eventint.png

Just for testing : delete the sub-events of events n°20 and 21. To both events, add a condition “If the animation of Player is finished”.
I think your attack animation is stopped because the no-attack animation is enabled even if the attack animation is not finished. But I don’t exactly know everything about your code and you surely need to have these sub-events. If it is the origin of the problem, try to rearrange your events in order to delete NewObject5 properly.

It’s not working. I think I’ll change those walking animation etc. events so, that when player isn’t moving do variable “move” =1, When player move do variable move = 2 and when attacking do variable 3 etc.
And when variable move is 1: do animation stop. Something like that.
In those player movement events NewObject5 is just tiny cube which appear in the position of the fist when pressed ctrl. So that’s not the problem here. There could be easier way to change the animation, because that player on the floor and do animation thing is not working situations like this when you have to do different animations when press buttons. But I’ll try do this thing with variables and if thats not work… :confused:

But again, thank you to try solve this!

Yeah! Variables works better :slight_smile: