Page 1 of 1

Help with animations not working correctly

Posted: Sat Mar 02, 2024 8:21 am
by Seth144k
Hi! So I am having issues playing animations using a library called anim8. Whenever I specify grid("1-3", 1) the animation plays normal and just fine. But when I want it to go to grid("4-6", 1) for the left walking sprites, for some reason it gets distorted and doesnt display correctly. The same thing happens if i just try and switch rows. Can somebody please provide a working solution for me to work with and explain, thank you!

Re: Help with animations not working correctly

Posted: Sat Mar 02, 2024 4:34 pm
by Taro
Hi, I saw the archive and checked the player.lua and it seems that the problem isn't from the file, is from the spriteSheet image. For a correct animation anim8 all the sprites have to be the same size in order (for example : if 1 sprite is 32 x 32, the other have to be 32 x 32). So you need to order the sprites of the spritesheet so each one fits in the grid

Sorry for the long text, hope this help :D