AllDarnDavey
Active member
Someone on the NESmaker facebook group was looking for this.
It's a warp tile that only warps when the player is pressing up while on the tile, useful for doing doors that you have to press up to enter.
Make a new tile script named "warpToScreen_OnPressUp.asm" assign it to a tile type, and give it this code:
This only works for player one, but it wouldn't be too hard to make a 2 player version, just add a player2 and gamepad2 check to it.
It's a warp tile that only warps when the player is pressing up while on the tile, useful for doing doors that you have to press up to enter.
Make a new tile script named "warpToScreen_OnPressUp.asm" assign it to a tile type, and give it this code:
Code:
CPX player1_object
BNE +notPlayerForWarpTile
LDA gamepad
AND #%00010000
CMP #%00010000
BNE +notPlayerForWarpTile
WarpToScreen warpToMap, warpToScreen, #$01
;; arg0 = warp to map. 0= map1. 1= map2.
;; arg1 = screen to warp to.
;; arg2 = screen transition type - most likely use 1 here.
;; 1 = warp, where it observes the warp in position for the player.
+notPlayerForWarpTile:
This only works for player one, but it wouldn't be too hard to make a 2 player version, just add a player2 and gamepad2 check to it.