setting up a warp input?

I want to try and use warps for my game in between different levels, but i want it to be based off input, does anyone know a script or way to set this up? and for example adventure of link, or even Kirby's adventure.
 

dale_coop

Moderator
Staff member
You want an input script that just does a warp ?

Just write that code, in your input script:
Code:
    WarpToScreen warpToMap, warpToScreen, #$01
It will automatically do a warp (to the "warp out x,y coords" set for the current screen).
 
sorry, i should have clarified myself. the input would be used only if the player is standing in or on a certain tile, then allowing him to warp to the next screen.
 

dale_coop

Moderator
Staff member
Then you could see that differently.
In the tile script, you could check if a certain button is pressed then do a warp.

Modify the Warp tile script... and check for any button before doing the warpToScreen
For example, check if the UP is pressed:
Code:
LDA gamepad
AND #%00010000  ;; UP
BNE +continue  ;; if pressed then continue
    RTS     ;; else stop the script here
+continue:

If you prefer checking if the B button is pressed:
Code:
LDA gamepad
AND #%00000010  ;; B
BNE +continue:
    RTS
+continue:

If you prefer checking if the A button is pressed:
Code:
LDA gamepad
AND #%00000010  ;; A
BNE +continue:
    RTS
+continue:
 
Top Bottom