So far I could solve all my problems with a tutorial or something similiar but this one is driving me crazy. Although I could find solutions on the internet, they wouldn’t work out or were not comprehensible enough for me.
My problem is if I press simultaneously two movement buttons for example W (upper movement) and D (movement to the right) it freezes my animation instead of playing the W animation.
It seems like Silver-Streak came up with a solution on this thread:
but I have no clue how to implement it. I tried it but it didn’t work out - I couldn’t wrap my head around which variable (string, boolean etc) he ment. Also I couldn’t find a “If” condition under:
Hey, the problem is that the animation keeps changing between the 2 animations since your events trigger on every frame, so the animation freezes on the first frame.
Here’s a similar post with the same issue, and you can implement MrMen’s solution.
For the last action I used the expression “PlayerAnimation”, idk if thats a mistake. Also the other actions look diffrent than from the screenshot. On my screenshot it says:
PlayerAnimation: SET TO “RunRight”
on the shown screenshot it says
PlayerAnimation: = “RunRight”
I would say it’s the same but idk.
Edit: I also had the inverted conditions in it but deleted them afterwards to look if it makes a difference (nope).
The reason its not working its because your not telling it to change animations…
The whole thing has 2 parts…
First you make it so that when you press a key, you change a string variable to say something like “Up” or “Down”… what you made, that part is fine.
The second part… the part thats missing is making a condition that says “If scene variable “PlayerAnimation” says “RunDown””… the do the action "Change animation of player to “RunDown”…
Because you added the double quotes in the last event, you’re not getting the value of the string variable PlayerAnimation, instead it’s setting the animation to a string called "PlayerAnimation” (which doesn’t exist as an animation name).
You can either remove the double quotes and make sure the PlayerAnimation is added in the scene variables, or set the animation to VariableString(PlayerAnimation).