FIRST MAKE SURE YOU HAVE DONE THIS TUTORIAL:
Explanation: The userScreenByte0 user variable will now be used to control where you warp to. Zero number or null will now always result in normal warp tile function AKA it warps to designated screen from the actual screen settings. 1-255 (use hex as always) will be for screens you choose. you'll note this script has limited default warps. You need to set up your warps. the end of the script is commented to be used for copy > pasting and continuing with more map coordinates.
Code: Select all
CPX player1_object BEQ +doWarpPlayer JMP +notWarpPlayer +doWarpPlayer: LDA userScreenByte0 CMP #$00 BNE doNextWarp 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. doNextWarp: LDA userScreenByte0 CMP #$01 BNE doNextWarp WarpToScreen #$00, #$02, #$01 ;;test numbers to try to warp to screen 2 or 3 i dont care as long as it warps;; doNextWarp: LDA userScreenByte0 CMP #$02 BNE doNextWarp WarpToScreen #$00, #$03, #$01 ;;test numbers to try to warp to screen 2 or 3 i dont care as long as it warps;; doNextWarp: ; LDA userScreenByte0 ; CMP #$03 ; BNE doNextWarp ; WarpToScreen #$00, #$04, #$01 ;;any screen you want etc.. keep going as long as you want;; ; doNextWarp: +notWarpPlayer:
I HOPE ALL THIS MAKES SENSE.
If anyone needs future clarity I can make a video or something. For now it's just a script you need to edit your own coordinates to.
This is so you can warp to two different locations. For example, what if you set on the screen that you want to warp to 0,0 as default yes this on 0 will warp there.... but that's what a normal warp does. so this is al ALTERNATIVE so you can have another... you wont have to use a different tile every time you want two warps per screen. I use 0 as a default in case you mess up. its a safety feature thats all.
Thank you. have a nice weekend!