I created the 2 blocks Munchies that are starting to go up and Munchies starting to go down... Just like the video above. My first block works perfectly. if the Munchies are up you get hurt. The second set of Munchie blocks that start going down. If you go near the block it crashes the emulator. This is how I set up the blocks
Block 1 Munchies going up....
Code
!Gl = $00 ; $00 if it should be based on level exAnim, and $20 if it should be based on global exAnim
!Slot = $00 ; exAnimation slot the hurting should be based on
!Min = $03 ; First frame the block should hurt on
!Max = $0F ; Last frame the block should hurt on
db $42
JMP M : JMP M : JMP M : JMP R : JMP R : JMP R : JMP R
JMP M : JMP M : JMP M
M:
LDA $7FC080+!Gl+!Slot ;\
CMP #!Min ;|
BCC R ;| Check if it is a correct frame
CMP.b #!Max+#$01 ;|
BCS R ;/
JSL $00F5B7 ; If yes, hurt the player
R:
and block 2 Munchies going down...
Code
!Gl = $00 ; $00 if it should be based on level exAnim, and $20 if it should be based on global exAnim
!Slot = $00 ; exAnimation slot the hurting should be based on
!Min = $13 ; First frame the block should hurt on
!Max = $1F ; Last frame the block should hurt on
db $42
JMP M : JMP M : JMP M : JMP R : JMP R : JMP R : JMP R
JMP M : JMP M : JMP M
M:
LDA $7FC080+!Gl+!Slot ;\
CMP #!Min ;|
BCC R ;| Check if it is a correct frame
CMP.b #!Max+#$01 ;|
BCS R ;/
JSL $00F5B7 ; If yes, hurt the player
R:
RTL
Did I setup the blocks wrong?