Player stays in running animation when falling

CutterCross

Active member
Whenever you run off an edge, the player stays in it's running animation while it's falling. I've been trying to fix this myself but with no luck. Anyone else know a way to fix it?
 

WolfMerrik

New member
You could create a state for falling (or use jumping) and set it to the player when the ground below is not solid
I would assume the best place for this would be in the theGroundIsNotSolid: on AccAndSpeed_Platform_Simple.asm (or whichever AccAndSpeed you are using)
 

cornphillips

New member
I've also found that if i jump up one and to the right tile onto another block, and my jump is only big enough to make it up that amount, then the animation gets stuck on the first fame while running right, but it doesn't happen when doing the same thing going left.
 

drdocker

New member
WolfMerrik said:
You could create a state for falling (or use jumping) and set it to the player when the ground below is not solid
I would assume the best place for this would be in the theGroundIsNotSolid: on AccAndSpeed_Platform_Simple.asm (or whichever AccAndSpeed you are using)

Thanks for pointing this out! If anyone else is interested in adding a falling state I added it to Physics_Platform_Simple.asm under theGroundIsNotSolid2_b: label at line 790
Code:
theGroundIsNotSolid2_b:
LDX player1_object
    ; change player to falling/ jumping state
	ChangeObjectState #$02, #$02
	JMP noCollisionHere_v

@ WolrMerrik do you know how I would check the player's current state? I only want to change it to falling if it's currently in the idle (0) or running (1) state.
 

drdocker

New member
Actually, @MistSonata pointed out a solution in a similar thread here http://www.nesmakers.com/viewtopic.php?f=23&t=1314
 
Top Bottom