Page 1 of 1

[SOLVED] Help setting up anim8 with platformer

Posted: Sat Dec 19, 2015 11:48 pm
by giantofbabil
EDIT 2: SOLVED! Just restructured my whole animation code do to a Eureka! moment and everything is working much better now! On to adding more animations :joker:

EDIT: Original problem solved but there is still more polish needed on the current animations. The issues I'm facing right now are switching from left to right or right to left movement too quickly sometimes causes idle animation while moving, and holding left and right down at the same time causes the sprite to sit in one spot with either the left or right animation looping. I'll be working on these whenever I have time but always appreciate more help!

Thought I was done struggling when I finished my movement code, apparently not!

I'm trying to set up anim8 and right now I have 3 animations: idle, left, and right. What happens right now is the idle animation works fine, if you aren't touching any buttons you idle with animation. If you hold ANY button at ANY time other than space bar(jump) the right animation will start, but I only want it to happen if the player is on the ground and moving right. The left animation never works. I think maybe I'm going to have to scrap all of my animation code but I don't know what to do to make it work right.

Here is the repository please check it out: https://github.com/giantofbabil/Space-Chow.love

I greatly appreciate any help with this, thanks.

Re: Help setting up anim8 with platformer

Posted: Sun Dec 20, 2015 2:36 am
by TheOdyssey
I fixed both problems you were talking about :). You had everything right but it was only a syntax issue (is that what it's called? I don't help people often...) The changes are in this pull request and there's a .love below

P.S I had to enable unlimited double jumps because the way the map is set out is annoying :3

Re: Help setting up anim8 with platformer

Posted: Sun Dec 20, 2015 3:26 am
by giantofbabil
TheOdyssey wrote:I fixed both problems you were talking about :). You had everything right but it was only a syntax issue (is that what it's called? I don't help people often...) The changes are in this pull request and there's a .love below

P.S I had to enable unlimited double jumps because the way the map is set out is annoying :3
Oh wow lol, always the little things! I'm actually restructuring the animation code now because I was creating a lot of new animations that should've been all made at the start in love.load() but I will get this in! The only problem that's left is that when you land from a jump and are holding left or right the animation stops, but that's something I plan on dealing with after I get in jumping/wall jumping animations.

The reason the map is set up like that is because I just got done making wall jumping! If you jump and hold left or right as you hit a wall you'll stick to it and can jump back and forth up the walls! The map is a test map right now though, it won't be in the finished game I just set it up for whatever's ideal to test what I'm currently programming.

Thanks a lot!