vanderblade
Active member
This is a complicated process, so I'm hoping we can solve it as a community.
Caveat: I'm trying my best to learn here, so I apologize for all my (perhaps obvious) errors and mistakes.
Here's what needs to happen logically for a simple jump kick.
Press an input (let's say the A button, but could be whatever) to:
1) change the player action state to a jump animation;
2) while in this state, move the player up and either left or right depending on the direction player is facing, and then back down to their previous x horizontal position to maintain illusion they've jumping up and over before coming back down to the starting x position;
3) make player invincible during this action state (best practice to avoid interruption);
4) create game object for a kicking leg that hurts monsters when colliding with their hit box.
I've been trying to write a script and right now can press A to change the player action state to a jump animation. Big whoop, right?
But I'm having issues working through the logic of moving the player up and in the direction they are facing, implementing the invincible flag (not native to the brawler mod), and thinking through how to spawn a kick game object that would damage the monster).
There's also the issue that I'll have to go back and, I believe, update all the move scripts to check if the player isJumping so you can't suddenly start walking while in the middle of a jump kick.
Here's what I have so far. And yes, I know that this would, if it worked, only send the player up and to the right while in their jumping animation. But it's a start. As it stands, the player goes into their jumping action state but does not move at all.
Caveat: I'm trying my best to learn here, so I apologize for all my (perhaps obvious) errors and mistakes.
Here's what needs to happen logically for a simple jump kick.
Press an input (let's say the A button, but could be whatever) to:
1) change the player action state to a jump animation;
2) while in this state, move the player up and either left or right depending on the direction player is facing, and then back down to their previous x horizontal position to maintain illusion they've jumping up and over before coming back down to the starting x position;
3) make player invincible during this action state (best practice to avoid interruption);
4) create game object for a kicking leg that hurts monsters when colliding with their hit box.
I've been trying to write a script and right now can press A to change the player action state to a jump animation. Big whoop, right?
But I'm having issues working through the logic of moving the player up and in the direction they are facing, implementing the invincible flag (not native to the brawler mod), and thinking through how to spawn a kick game object that would damage the monster).
There's also the issue that I'll have to go back and, I believe, update all the move scripts to check if the player isJumping so you can't suddenly start walking while in the middle of a jump kick.
Here's what I have so far. And yes, I know that this would, if it worked, only send the player up and to the right while in their jumping animation. But it's a start. As it stands, the player goes into their jumping action state but does not move at all.
Code:
;;an attempt at a faux jumping script for brawler module
TXA
STA temp ;; assumes the object that we want is in x.
GetActionStep temp
CMP #$03 ;; is it already jumping?
BNE +notJumping
;; wait until we're back to idle to jump again.
RTS
+notJumping
CMP #$07 ;; is it hurt?
BNE +canJump
;; wait until we're back to idle to jump
RTS
+canJump
TXA
STA temp ;; assumes the object we want to move is in x.
ChangeActionStep temp, #$03 ;; assumes that "jump" is in action 3
;arg0 = what object?
;arg1 = what behavior?
StartMoving temp, #UPRIGHT
RTS