Help with animation

Hello! Hoping someone can help me.

I am making an adventure module game where the "A" button does not serve any practical purpose. Therefore, like the game proceeding this one, I would like to make holding the A button play an animation. It won't do anything, just make the player sprite bob its head. How would I go about doing this?

Any and all help is appreciated, thank you in advance! :)
 
If you did somthing along the lines of this but put the input to the A button it could at least get you started.
http://nesmakers.com/viewtopic.php?f=3&t=1760&hilit=Switch+player+object
 
Electric cat said:
If you did something along the lines of this but put the input to the A button it could at least get you started.
http://nesmakers.com/viewtopic.php?f=3&t=1760&hilit=Switch+player+object

Thanks, I appreciate that! However, I don't think it would work so well as a separate object, plus he says it's buggy and not a great idea for big games, which this... will be. I was hoping there'd be some way to just map an input to a new action step or something, like how weapons work, but with no weapon, just an animation. Any possible way to do that?
 

SciNEStist

Well-known member
As long as you have an unused action step, you can simply add an input script that changes the player to that object state. then have that set to go back to the first step when done.

for example:
Code:
 GetCurrentActionType player1_object
 CMP #$00 ;;ONLY IF STANDING STILL
 BEQ ++
 JMP +++ ;;if not standing still, jump ahead
 ++
ChangeObjectState #$07, #$02 ; change to state #7
;PlaySound #SND_MYSOUND ; uncomment this line if you want a sound associated with the animation
 +++

You would save that script, then add it to the game using the input editor.

then set the animation on the chosen state (state 7 in this example) to go back to first when animation is complete or when the action is completed on a timer.

I did this with my game to make the player sniff the ground when pressing a button. (there is a bit more to it, but the animation was important)
 

Attachments

  • blah.png
    blah.png
    100.7 KB · Views: 2,099
Top Bottom