Dude stop game sprites9/3/2023 I don't know if it will yield anything, but it might help narrow down what is causing the animation not to play.įor making the collision shape change, I think the easiest way would be to use an AnimationPlayer node instead of a AnimatedSprite node. Could you post the entire character script? I do not know if I'll be able to figure it out, but maybe looking at the entire script will help.Īnother thing you can try is adding something like print($Sprite.animation) and look at the console to see what is going on. I have not really done a lot of 2D Godot work and I've only briefly touched on nodes like the AnimatedSprite node, so it is quite possible I'm missing something. Also, before making changes, backup your project so you do not loose any progress if something doesn't work! Then you can replace $ay("Fall") with change_animation("Fall"), and the animation should play normally, if the animation being reset was causing the issue. Something like this should work, though I have not tested the code: func change_animation(animation_name): I generally make a helper function to make this process a little easier. All you need to do is check whether the animation playing is the animation you want to change to. If this is the issue, then the fix is relatively simple. Perhaps the play function is constantly resetting the animation, so the animation cannot get beyond the first fame. The other issue that might be causing the problem is that the fall animation is being called without checking to see if the fall animation is already playing. Have you tried playing the fall animation by itself, just to ensure the animation is setup correctly? While I doubt this is the case, maybe the fall animation is setup with only a single frame? I would try debugging and verifying that the fall animation is properly setup, just to make sure. In the code posted, I do not necessarily see anything that looks out of place. Based on what you wrote, I'm guessing this is the first frame of the Fall animation. Watching the video, it looks like the fall animation gets stuck with the character's hands up in the air.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |