Im trying to add a dash to the game looked around the forum a bit and got the basics of holding a direction and pressing b to trigger animation/sound
Code:
LDX player1_object
;;And add a code at the beginning of the script In input editor with fiest button as held then this checks if other buttons
LDA gamepad
;;AND #%00010000 ;; if UP is pressed
;;AND #%00000001 ;; if A is pressed
AND #%00000010 ;; if B is pressed
BNE +
RTS ;; if not, stop the script
+
STA Object_h_speed_hi,x
StartMoving player1_object, MOVE_LEFT
FaceDirection player1_object, FACE_LEFT
ChangeObjectState #$05, #$02 ;;set player state to dash ie state #$05
PlaySound #sfx_jump
RTS
I copied the line
"STA Object_h_speed_hi,x" from this thread
http://nesmakers.com/viewtopic.php?f=23&t=869&p=17934&hilit=dash#p17934
I have a left and a right version of this script attached in the input editor with hold on left and right and it almost seems to kinda work when i pres left and b but shoots of to the right and dose nothing then i press right.
Heres a test of just the input and animation working.
[media]https://twitter.com/i/status/1246489384322547721[/media]
I want the in air or anywhere dash to trigger when u hold/press a direction and press b and propel character in a direction locking out other control for x amount of time(will balance later).
Any help would be appreciated. Thanks
The other thing i wana get implemented this week is bg tiles that break /dissaprear when u stand on them, was gona edit the collection script and see how that goes, any tips on this or threads i should look at ?