Idle animation after jump

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
User avatar
mystemo
Posts: 13
Joined: Thu Aug 09, 2018 6:17 am
Location: Sweden

Idle animation after jump

Post by mystemo » Sun Sep 09, 2018 7:54 pm

I'm working on a platformer using the standard platformer module without any modifications so far. However I've noticed that when landing and continuing to move after a jump or a fall the animation gets locked into the idle animation until I release the d-pad. Stranger still it only seems to happen when moving ot the right, when moving to the left the animation transitions to the walking animation as it should. I saw an old tread about changing the code in the "AccAndSpeed_Plateform_Simple.asm" file but that didn't work for me at least and that script file doesn't even appear to be read into the game, maybe it was for an older version of the software? Any help would be greatly appreciated.
User avatar
mystemo
Posts: 13
Joined: Thu Aug 09, 2018 6:17 am
Location: Sweden

Re: Idle animation after jump

Post by mystemo » Sun Sep 09, 2018 11:37 pm

I just noticed it also happens after I change screen, but again only when going from left to right and not when going from right to left.
User avatar
mystemo
Posts: 13
Joined: Thu Aug 09, 2018 6:17 am
Location: Sweden

Re: Idle animation after jump

Post by mystemo » Mon Sep 10, 2018 2:17 am

Does anyone have a project file where the animation transitions work as they should that I could look at?
I've been trying different things for hours now and I just can't figure it out, especially since it only happens when moving right.
User avatar
UltraNarwhal
Posts: 54
Joined: Sat Aug 11, 2018 11:33 am
Location: UK
Contact:

Re: Idle animation after jump

Post by UltraNarwhal » Wed Sep 12, 2018 11:09 am

I noticed this, 99% it works fine then suddenly walking with idle animation.
I think it's due to having walk animation activate on press, rather than on hold. To get walk animation to work on hold though you'd need to write some new code, on hold with current code makes an infinite loop restarting action step.

A code functioning like this, but in ASM (which I need to get my head round)

if animation <> walk
& player on ground
let animation = walk
else
do nothing
User avatar
dale_coop
Posts: 5408
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Idle animation after jump

Post by dale_coop » Wed Sep 12, 2018 12:55 pm

But I think depends of projeccts. In your particular case, you would like the player to be in action step 01 when he's back on the ground.
Because you suppose you are holding the left/right button? and because there is a setToWalkingAnimation script assigned to your hold left/right button.
Not so simple...

But if you are in this particular case, and you want it to be like thatn you could modidy the "Physics_Plateform_Simple.asm" script, around line 805 :

Code: Select all

theGroundIsSolid:
	LDA Object_type,x
	BNE AboveIsSolid ;; does every object need this determination for *jumping*?
	;; check ground, bit 2 of status
	LDA Object_status,x
	AND #%00000100
	BNE AboveIsSolid ;; it is alrady solid.
	;; if it wasn't solid, set it to solid, and change from jumping to normal
	
	LDA Object_h_speed_hi,x
	BEQ +
	LDA #$01
	JMP gotLandState
+
	LDA gamepad  ;; dale_coop: check the GamePad, if still moving ?
	AND #%11110000  ;;dale_coop directional buttons
	BNE gotLandState;; dale_coop

	LDA #$00
gotLandState:
	STA temp
	ChangeObjectState temp,#$02
I can't test anything, I am not home... But it would be something like that (do some tests/adjustements if needed)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
UltraNarwhal
Posts: 54
Joined: Sat Aug 11, 2018 11:33 am
Location: UK
Contact:

Re: Idle animation after jump

Post by UltraNarwhal » Wed Sep 12, 2018 3:44 pm

Thanks Dale, looked at that and code from movement problems thread. Fiddled with lots of separate bit of code for hours, but no luck.
I did notice even after removing changetoidleanimation script in input, after jumping and even stopping walking it still changed to idle though.
User avatar
dale_coop
Posts: 5408
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Idle animation after jump

Post by dale_coop » Wed Sep 12, 2018 3:51 pm

Yep, it's in the code, after a jump. The player is automacally set to idle.
I will dig in and do some tests tonight (when at home), if you want.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
UltraNarwhal
Posts: 54
Joined: Sat Aug 11, 2018 11:33 am
Location: UK
Contact:

Re: Idle animation after jump

Post by UltraNarwhal » Wed Sep 12, 2018 9:22 pm

I'm not too worried about it at the moment (as not making a game yet), it might even vanish in the next update anyway.
User avatar
mystemo
Posts: 13
Joined: Thu Aug 09, 2018 6:17 am
Location: Sweden

Re: Idle animation after jump

Post by mystemo » Fri Sep 14, 2018 3:12 am

Thanks so much for the tips! I'll have a look at this as soon as I can.
brockj
Posts: 9
Joined: Sun Sep 09, 2018 10:35 pm

Re: Idle animation after jump

Post by brockj » Tue Sep 18, 2018 1:41 am

I am noticing the same thing, not sure if anyone has found a fix for it yet. I have been trying a few things, certainly learning lots about the tool, but not making any headway.
mystemo wrote:
Sun Sep 09, 2018 11:37 pm
I just noticed it also happens after I change screen, but again only when going from left to right and not when going from right to left.
This is exactly my case.
Post Reply