Warp script not working

Bucket Mouse

Active member
I can't make this input warp script work. It's supposed to send you to two different screens, depending on which button (A or B) you push. But instead of looping, it automatically warps to the first warp on the list.

What am I doing wrong?

Code:
 blurg:
LDA gamepad
AND #%00000010
BNE arghh
GoToScreen #$01, #$01, #$02
RTS
arghh:
LDA gamepad
AND #%00000001
BNE blurg2
GoToScreen #$02, #$01, #$02
RTS
blurg2:
JMP blurg
 

dale_coop

Moderator
Staff member
The script works on my project...
If you press B while walking on the tile, you warp the screen 2.
If you press A, or not press A nor B, while walking on the tile, you warp the screen 1.

But maybe it's not what you want? Could you be very very vey precise about what you want?
 

dale_coop

Moderator
Staff member
If you want a script that doesn't warp... until the player press A or B...
Something like would be better:

Code:
;; the warp script starts here, when the player is colliding the tile...

	;; checking the B button :
	LDA gamepad
	AND #%00000010
	BNE bButtonPressedWarp
	
	;; checking the A button :
	LDA gamepad
	AND #%00000001
	BNE aButtonPressedWarp
	
	JMP endButtonPressedWarp


aButtonPressedWarp:
	GoToScreen #$01, #$01, #$02
	JMP endButtonPressedWarp


bButtonPressedWarp:
	GoToScreen #$02, #$01, #$02
	JMP endButtonPressedWarp


endButtonPressedWarp:
	;; end of the tile script
 

VDfreesince1983

New member
bit confused on this one, is this script tied to the controller input like jump or movement would be? or is this for a tile type? So I place a tile it checks the input and if the player is on the tile and pressing up (for me) it warps to X,Y screen?
 
Top Bottom