JUMP Animation Help (Newest Version 4.5) (Death Animation solved)

Mazypzaz

New member
Hello! I followed the tutorials for beginner, Intermediate, and Advanced for the simple platformer and I am still so lost on many things. The biggest Thing is the lack of a Jumping animation Along with a death animation. In older tutorials I found on YouTube, These where initially included. I have the animation frames and even have them set up in the Game Objects-Player Settings, I just cant seem to get them to work In game! I just hope I am not missing anything because I am now stuck.

I may ask more questions from time to time as I am still learning the program, Thank you for your time.

Edit: I accidentally posted this same question in bugs + suggestions, please ignore that one.
 
Last edited:

Mazypzaz

New member
I am using the Arcade Platformer Module and followed all tutorials on the learn section. So at this moment, I have a general understanding of how to navigate and utilize most of the tools. I just can’t seem to figure out how to enable a player death animation along with the jump, as in the tutorial he set up both animations for jump and death, yet never utilized them in all of the tutorials.
 

dale_coop

Moderator
Staff member
Hmm... for the jump animation, you could try adding the changeActionToJumping.asm input script from the "Game/MOD_MetroidVania\Inputs" folder.

2021_07_21_10_04_41_Paramètres.png


And assign it to your Press A button (in the Input Editor):

2021-07-21 10_18_11-NES MAKER 4.5.9 - Version_ 0x176 - ArcadePlatformerTutorial.MST.png

And maybe assigned again the changeActionToStop.asm for the Release A button.
 

dale_coop

Moderator
Staff member
About the Death animation... hmmm...

Modify your handle player hurt script, in the "Project Settings > Script Settings"... ( I'd suggest to duplicate the script, work on the duplicated one and assign it instead of the original one)... and replace all the code between the:
Code:
myLivesNotZero:
and the line:
Code:
+skipHurt
(currently it's a code that just warps you to the last checkpoint)

With that code:
Code:
        ChangeActionStep player1_object, #$07
        ;; stop player
        LDA #$00
        STA Object_h_speed_hi,x
        STA Object_h_speed_lo,x
        STA Object_v_speed_hi,x
        STA Object_v_speed_lo,x
        LDA xPrev
        STA Object_x_hi,x
        LDA yPrev
        STA Object_y_hi,x
        
        LDA #$FF
        STA gameState
(that code will not warp you directly anymore... but will play the action step 7 --death animation--)

The script should now looks like that:

2021-07-21 10_34_33-hurtPlayer_ArcadePlatformBase.asm - Visual Studio Code.png

And set your Action Step 7 to "GoToContinue", for end timer:

2021-07-21 10_32_21-Monster Animation Info.png
 

Attachments

  • 2021-07-21 10_33_27-hurtPlayer_ArcadePlatformBase.asm - Visual Studio Code.png
    2021-07-21 10_33_27-hurtPlayer_ArcadePlatformBase.asm - Visual Studio Code.png
    99.5 KB · Views: 2

Mazypzaz

New member
Thank you SO very much! The death animation worked perfectly! The Jump animation ALMOST worked, It just seems to get stuck whenever you jump AND move at the same time. Though, This is still a lot further than I had gotten before thanks to your help! If there is any why how I could possibly prevent the character from getting suck in a Jump animation when they land while I still move, Let me know! Thank you again for your help!
 

mouse spirit

Well-known member
I'm still in 4.1.5,but this should generally help.
The reason the animation doesn't work "correctly" yet is because it's not resetting to walk/or stand animation if I understand ya fine.
What's happening is that in the code,it doesn't know to stop jump animation when holding a direction and/or touching ground.

I believe in the jump input,and possibly an asm called extracontrolread (may be present in 4.5.x) that you will find the related code, and the correct spot to edit.

Anyway,essentially,you will have to say" When I am on the ground,and also holding/going right or left,change to running state also."
There may be other situations too. Like what if you are holding A,B?

So in the end, when you have decided on all of what the character can do, you'll have to make the code understand,in any situation,what state exactly you want the character to be in at all times.

For the jumping. Ask if on ground,and ask if button being pressed or not. Change state accordingly. And make it so nothing conflicts.

In those codes, there should be examples of byte flips. Like.....
AND 00000001;; is on ground?
Or...
AND 00000010;;;;gamepad- is pressing B?
Learning about these if you havnt will be helpful. I'm not at my pc or I would actually post examples.
But using these will help and cut out having to ask (in code) 50 IF questions. Very nice to have.
 
Last edited:

mouse spirit

Well-known member
This is an example,may be changed in 4.5.x....and when I learn the 4.5 equivalent, I can edit this post to reflect that.

LDA gamepad
AND #%00000001 ;;;is A pressed

or

LDA Object_physics_byte,x
AND #%00000001 ;; is it on ground

Learn or search these things in 4.5. on the search bar here on the site. They will help immensely .( Sometimes title only is a better search.)

Like I said,I'm in 4.1.5, but I can vaguely help,as to not confuse code between versions.
These were examples from 4.1.5 .
 
Last edited:
Top Bottom