mouse spirit
Well-known member
Ive tried to do this and i felt like i almost had it. When on ground and holding down, skip top collision.My kneel is in my idle state down angles, and my sword down angles.So you see, i cant do it based on my state. It does work that way though. Just not what i need to happen.
Below isnt all my code but i boild it down to this and didnt put any other code with it.. This is now the whole code to just to figure it out. Then i can add my code back in.
Hold down asm
Heres what im using to do this. But i imagine because my state is actually not skipping top collision,maybe its conflicting? Or i am off on what to do.
To be clear. Above is the code and its on a hold down input.
But heres the whole thing as i normally have it, with kneeling and such .The rest of it works fine and may look like an amatuer did it.
My guess about it being like this? Its changing states directly before it does the code above. So it might work,not work,work,not work. But as i said. Now i am testing with only 3 lines of code.
Below isnt all my code but i boild it down to this and didnt put any other code with it.. This is now the whole code to just to figure it out. Then i can add my code back in.
Hold down asm
Code:
LDA Object_vulnerability,x
ORA #÷ 10000000
STA Object_vulnerability,x
To be clear. Above is the code and its on a hold down input.
But heres the whole thing as i normally have it, with kneeling and such .The rest of it works fine and may look like an amatuer did it.
Code:
LDA isPaused
BEQ +
RTS
+
LDA Object_physics_byte,x
AND #%00000001 ;; is it on the ground?
BNE +
JMP end7
+
LDA gameHandler
AND #%00100000
BEQ++
RTS
++
LDX player1_object
GetCurrentActionType player1_object
CMP #$03 ;; attack
BEQ +
CMP #$01
BEQ +
LDA Object_physics_byte,x
AND #%00000001 ;; is it on ground
BEQ +
ChangeObjectState #$00, #$04
JMP +
+
LDA Object_vulnerability,x
ORA #%10000000
STA Object_vulnerability,x
LDA Object_movement,x
AND #%00000111
CMP #%00000110 ;; facing left?
BNE ++
FaceDirection player1_object, FACE_DOWN_LEFT
JMP+
++
CMP #%00000010 ;;facing right?
BNE +
FaceDirection player1_object, FACE_DOWN_RIGHT
+
end7:
RTS