Idle animation after jump

mystemo

New member
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.
 

mystemo

New member
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.
 

mystemo

New member
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.
 
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
 

dale_coop

Moderator
Staff member
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:
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)
 
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.
 

dale_coop

Moderator
Staff member
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.
 

brockj

New member
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 said:
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.
 

hairycarrot

New member
Yes. I also have this happen most time when changing screens the animation returns to idle.
When landing while holding movement, the animation changes back to idle.

Did that landing fix work?
 

Croque_Monsieur

New member
With NES Maker, I sometimes feel that whenever I set something up, some other thing breaks and when I try to fix the broken thing, a new one messes up.
I can't even program a "hello, world!", but it's a very steep learning curve, lol.
It's quite enjoyable though, but it takes loads of time to get things done. Back on the topic, yeah, with my character, setting up the walk cycle by holding a direction makes it jump and walk in the air. If I set up walking by pressing a direction, it jumps and stays in the jumping pose even after landing. Also for some reason, using the varjump thing makes it look like the infinite jump cheat on the gameshark, it's hilarious.
 

dale_coop

Moderator
Staff member
For the input scripts, it's not very complicated, just redo the same associations that the ones from the tutorial (something you could do is, keep a nesmaker opened with the tutorial demo... and open a new one for your project. When you have a weirdness on your project, you can check how are the settings, the scripts used on the tutorial one)

For the inputs:
press "A" for simpleJump.asm
release "A" for varjump.asm
Directions:
hold "left" for startmovingplayerleft.asm
release "left" for stopmovingplayerleft.asm
hold "right" for startmovingplayerright.asm
release "right" for stopmovingplayerright.asm
(also make sure that every scripts you use have a "RTS" line, at the end)

Don't forget to set your Player's actions steps (cf how it's set for the tutorial).
It's very important, each action step corresponds to a state of the player (when he's idle, when he's walking, when he's attacking, when he's jumping, when he's climbing,...). Some of them needs to GoToFirst when ended...
 

dale_coop

Moderator
Staff member
About the "Idle" animation issue.
Have you made a modification in the Extra Controll Script ?
If not, there is some lines of code to add around the end for fix the "idle" animation in some cases. Could you share your Extra Controll Script?
 
Top Bottom