Language…
6 users online: Daizo Dee Von, DashGamer, Guido_Keller, Isikoro, kasoku, marvisjj - Guests: 243 - Bots: 390
Users: 64,795 (2,377 active)
Latest user: mathew

wall stick issue

I took some code from von's acorn patch and added to the wall jump patch. Something isn't right, I want to able to stick to and jump of wallwalls by pressing jump. currently any button cause the jump and clinging to a left wall is glitchy.
Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Wall Kick
;
; Allows Mario to perform a wall kick by sliding along a wall and pressing the
; B button.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

!require_powerup	= !false	; Whether or not wall jumping requires a powerup.

!kick_x_speed		= $20		; The wall kick X speed.
!kick_y_speed		= $B8		; The wall kick Y speed.
!no_back_time		= $10		; The time to disable moving back after a wall kick.
!slide_accel		= $04		; The sliding acceleration.
!slide_speed		= $24		; The sliding speed.
!WallCling			= $60 ;WallCling
!flags			= $61		; The wallkick flags. (RAM)
!no_back_timer		= $62		; The timer for not moving back. (RAM)
!temp_y_spd		= $63		; The temporary Y speed. (RAM)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

!false			= 0		; Don't change these.
!true			= 1

org $00A2AF
		autoclean JSL wall_kick
		NOP
		NOP
		
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

freecode
reset bytes

smoke_x_offsets:
		db $0C,$FE

wall_kick_x_speeds:
		db !kick_x_speed^$FF+1,!kick_x_speed

wall_kick:	STZ $1888
		STZ $1889
		
		LDA $77
		AND #$04
		BEQ .in_air
		
		STZ !flags
		RTL
		
	.in_air	LDA !flags
		AND #$03
		BNE .slide
		
		LDA !no_back_timer
		BEQ +
		
		DEC !no_back_timer
		LDA !flags
		LSR
		LSR
		TRB $15
		TRB $16
		
	+	LDA $7D
		BMI .return	
if !require_powerup
		LDA $19
		BEQ .return
endif	
		LDA $71
		ORA $73
		ORA $74
		ORA $75
		ORA $1407
		ORA $140D
		ORA $1470
		ORA $1493
		ORA $187A
		BNE .return
		LDA $7E
		CMP #$09
		BCC .return
		CMP #$E8
		BCS .return
		LDA !flags
		LSR
		LSR
		AND $77
		BNE .return
		LDA $15
		AND #$03
		CMP #$03
		BEQ .return
		LDA $15
		AND $77
		BEQ .return
		
		STA !flags
		LDA $7D
		STA !temp_y_spd
	.return	RTL

	.stop	STZ !flags
		RTL
	
	.slide	
	
		LDA $15
		ROR A
		BCC .NotRight
		STZ $7D				;\
		STZ $76				; | Set pose
		LDA #$0D			; |
		STA $13E0			;/
		LDA #$01
		STA !WallCling
		BRA .ClingToWall

.NotRight	LDA !WallCling
		ROR A
		ROR A
		BCS .ClingLeft

		LDA $77
		ROR A
		ROR A
		BCC .Return
.ClingLeft	LDA $15
		ROR A
		ROR A
		BCC .Return
		STZ $7D				;\
		LDA #$01			; |
		STA $76				; | Set pose
		LDA #$0D			; |
		STA $13E0			;/
		LDA #$02
		STA !WallCling

.ClingToWall	LDA $D1				;\
		STA $94				; |
		LDA $D2				; |
		STA $95				; | Don't update position for next frame
		LDA $D3				; |
		STA $96				; |
		LDA $D4				; |
		STA $97				;/
		STZ $13DF
		LDA $16				;\ Check if jump was pressed this frame
		BNE .kick
		JSL .Return

.Return		STZ !WallCling
		RTL

	.kick	
	LDA #$0B
		STA $72
		LDA #!kick_y_speed
		STA $7D
		LDA #$01
		STA $1406
		STA $1DF9
		STA $1DFA
		
		LDX $76
		LDA.l wall_kick_x_speeds,x
		STA $7B
		
		LDA !flags
		TRB $15
		TRB $16
		ASL
		ASL
		STA !flags
		
		LDA #!no_back_time
		STA !no_back_timer
		
		LDY #$03
	-	LDA $17C0,y
		BNE +
		
		INC
		STA $17C0,y
		LDA $94
		STA $17C8,y
		LDA $96
		CLC
		ADC #$10
		STA $17C4,y
		LDA #$10
		STA $17CC,y
		RTL
		
	+	DEY
		BPL -
		RTL
RTL
		
print "Bytes inserted: ", bytes
I still need help resolving this, if anyone might have ideas on whats wrong with the patch.
Show me a gif or video. You can also try this block.
Give thanks to RPG hacker for working on Asar.
Not sure how to make a .gif or video, but I will try the blocks.
OBS or Licecap is a good option.
Give thanks to RPG hacker for working on Asar.
ok thank you.