What does second value in ChangeObjectState refer to?

Post Reply
User avatar
BentPawGames
Posts: 210
Joined: Wed Jan 16, 2019 10:29 pm

What does second value in ChangeObjectState refer to?

Post by BentPawGames » Fri May 22, 2020 11:11 pm

Sorry for the super basic ASM question: I have an understanding of what the first variable refers to in ChangeObjectState, but sometimes I see "ChangeObjectState #$02, #$02" (e.g. melee), but then also see "ChangeObjectState #$01, #$04" for jump, movement, etc. I am a bit confused about what it means when the second value changes from, say, #$02 to #$04 and in what contexts. Thanks!
User avatar
CutterCross
Posts: 436
Joined: Sat Apr 28, 2018 9:42 pm
Contact:

Re: What does second value in ChangeObjectState refer to?

Post by CutterCross » Fri May 22, 2020 11:38 pm

The ChangeObjectState macro defines the 2nd argument as the initial animation timer. So basically the speed you want the object's animation to play. Not sure if the animation's own animation speed overwrites that or the other way around, but might as well keep it the same for consistency's sake.

All included macros can be looked at through the Defined Scripts tab in the NESmaker UI if you need to double-check anything.
User avatar
BentPawGames
Posts: 210
Joined: Wed Jan 16, 2019 10:29 pm

Re: What does second value in ChangeObjectState refer to?

Post by BentPawGames » Fri May 22, 2020 11:42 pm

Thanks!
Post Reply