OK, me again. You’re probably getting tired of all my stupid questions, but I’m gonna take my chances once more anyway
So I have this character currently with three animations, one for moving right, one for left and one for idle. The problem is that it seems only the first frame is played when moving to the left or right. Not using any keys will trigger the idle animation, which works. However, if I deactivate the idle-event or even put in a pause animation in that event, the animations for moving sideways works as expected.
Not sure if it matters, but this character has the physics automatism. Deleting it will playback the animations the same way, so I’m pretty sure that’s not the problem. All the images are also of the same size, as I saw an earlier post mentioning this.
Animation #1 is the idle-animation, #0 is the one for moving right and #2 is the one for moving left. That shouldn’t be a problem?
Hi
First excuse me for my English I’m french.^^
I think you must delete the actions “Play the current animation of Man” to solve your problem. Because the software plays the annimation with out your help.
If the problem persists you can check the time behind each image and you must tick repeat the images.
Thank you for your suggestion, but I’m afraid the result is the same when these are deleted. And as for looping, this is checked. As I mentioned, if I deactivate the first event or replace it with a “Pause the current animation of xx”, the left and right animations are working just fine.
The “any key is pressed” condition is a bit special as it is not continuously true even when a key is kept pressed.
So for now I think the best solution is to use two conditions like this : “d” key is not pressed and “a” key is not pressed.
Hmm. I tried your idea as well 4ian, but it still isn’t playing the animations when hitting a and d. I’ll probably just stick to using pause animation action in the Any key is not pressed event for now. Doesn’t make much sense to me, can’t really see what I’m missing.
No, no, you must use the two conditions “d” key is not pressed and “a” key is not pressed in the same event. ( Otherwise it does not indeed make any sense ).
Just replace the first condition of the first screenshot by the two conditions.
So I’ve managed to add animations for walking and running a while ago, but now I’m struggling with adding animation for jumping. Ideally I would like to have an animation that is played once when you hit the jump key, not having to hold down the key in order for the animation to complete all its frames. What I have now is the following, where you have to hold down the key for the animation to complete, the Linear speed action doesn’t work and where you have to not press any walk key to be able to start the jump animation. In other words, not good.
[attachment=0]Screenshot_2.png[/attachment]
Has anyone had more success than me in creating something similar? Any pointers would be appreciated
Edit: If I remove the animation actions in event 22 it works fine, as in you are able to jump while walking and the character actually jumps…
I would juste change the animation when you’re setting variable Jumping to 1.
Your events seems to be correct: As long as jumping is equal to 1, the animation will be set to 3.
You still have to ensure that the jumping animation is not interrupted, that is to say make sure that there is no other actions trying to change the animation. If you have others events trying to change an animation ( For example, events related to Right/Left keys ), you can add an extra condition checking if “Variable jumping is =0” before changing the animation for example.