kevintron
Active member
Ive been digging through the older help threads looking for tips and general understanding. I came accost this Dash Issues thread which works out getting a dash button working for the Maze/adventure module. I mostly understand it and messed around until I got something working. I made 4 dash input scripts one for each direction. Hold B and right direction run right dash script. do one for each direction. then I also put change moving to stop on B release. This Boost in what ever direction is held as long as b is held. I understand what part of the code to change to increase the speed so that's all good. Now the weird thing is as long as I Hold a direction and B I boost and can change direction if I roll my finger on the d-pad. Including diagonal which is something that does not work in my game(which for this project I prefer). The other weird thing if I hit right and down together it moves diagonal the opposite way down and left. Every other diagonal works fine. I was wondering if anyone knows why that might be. I guess I want all the diagonals to work or none of them. I will include the code below. The last thing I was wondering is can I put a timer and a cool down on the boost so the player cant boost endlessly? I'm still pretty novice but kinda proud that I got it working this far. This is the last feature my game needs. One note my input also has extra code at the top to disable button inputs during text, that is currently working. Here is a link to fix text issues.
Code:
;;;; dash Left
LDA is_drawing_box ;; Check if box is still drawing pigeonaut fix
CMP #$00
BEQ +do_player_input ;;no longer drawing so we can do player input again!
JMP skip_player_inputm ;; is_drawing_box is still a 1 so that must mean the text is still drawing. Better skip player input to avoid freezing the game!
+do_player_input
;; player input stuff
TXA
STA temp ;; assumes the object we want to move is in x.
GetActionStep temp
CMP #$07
BNE +notHurt
RTS
+notHurt
;;dash Left AllDarnDavey Object_direction variable
LDA #%00000110
STA Object_direction,x
LDA #$04
STA Object_h_speed_hi,x
skip_player_inputm
RTS
;;;; dash Up
LDA is_drawing_box ;; Check if box is still drawing pigeonaut fix
CMP #$00
BEQ +do_player_input ;;no longer drawing so we can do player input again!
JMP skip_player_inputo ;; is_drawing_box is still a 1 so that must mean the text is still drawing. Better skip player input to avoid freezing the game!
+do_player_input
;; player input stuff
TXA
STA temp ;; assumes the object we want to move is in x.
GetActionStep temp
CMP #$07
BNE +notHurt
RTS
+notHurt
:;dash Up AllDarnDavey Object_direction variable
LDA #%00000100
STA Object_direction,x
LDA #$04
STA Object_v_speed_hi,x
skip_player_inputo
RTS
;;;; dash Right
LDA is_drawing_box ;; Check if box is still drawing pigeonaut fix
CMP #$00
BEQ +do_player_input ;;no longer drawing so we can do player input again!
JMP skip_player_inputn ;; is_drawing_box is still a 1 so that must mean the text is still drawing. Better skip player input to avoid freezing the game!
+do_player_input
;; player input stuff
TXA
STA temp ;; assumes the object we want to move is in x.
GetActionStep temp
CMP #$07
BNE +notHurt
RTS
+notHurt
;;dash Right AllDarnDavey Object_direction variable
LDA #%01000010
STA Object_direction,x
LDA #$04
STA Object_h_speed_hi,x
skip_player_inputn
RTS
;;;; dash Down
LDA is_drawing_box ;; Check if box is still drawing pigeonaut fix
CMP #$00
BEQ +do_player_input ;;no longer drawing so we can do player input again!
JMP skip_player_inputp ;; is_drawing_box is still a 1 so that must mean the text is still drawing. Better skip player input to avoid freezing the game!
+do_player_input
;; player input stuff
TXA
STA temp ;; assumes the object we want to move is in x.
GetActionStep temp
CMP #$07
BNE +notHurt
RTS
+notHurt
;;dash Down AllDarnDavey Object_direction variable
LDA #%00010000
STA Object_direction,x
LDA #$04
STA Object_v_speed_hi,x
skip_player_inputp
RTS
Last edited: