Note: I'd originally marked this as "resolved" because I'd found the variables for a screen's warp-in coordinates, but I'm still unable to get the rest to work...
Some background: I'm using the two-player co-op module 4.1.5.
I'm trying to create a tile that will warp the player back to the warp-in location (along with doing damage). The purpose of this is to act as a "pit" tile for a single-screen platformer. This is the script I have so far:
This works to reset the player's Y coordinate, but for some reason it doesn't do anything to the X coordinate. In other words, this:
seems to be the issue, even though the corresponding Y-coordinate code is working just fine. Any ideas what I might be doing wrong?
Some background: I'm using the two-player co-op module 4.1.5.
I'm trying to create a tile that will warp the player back to the warp-in location (along with doing damage). The purpose of this is to act as a "pit" tile for a single-screen platformer. This is the script I have so far:
Code:
LDA Object_flags,x
AND #%10010000
BNE ++
+
cpx player1_object
bne +
LDA newY
STA Object_y_hi,x
LDA newX
STA Object_x_hi,x ;
lda Object_timer_0,x
bne +
jsr playerGetsHurt
+
LDA #TILE_SOLID
STA tile_solidity
cpx player2_object
bne +
LDA newY
STA Object_y_hi,x
LDA newX
STA Object_x_hi,x
lda Object_timer_0,x
bne +
jsr playerGetsHurt
+
LDA #TILE_SOLID
STA tile_solidity
++
This works to reset the player's Y coordinate, but for some reason it doesn't do anything to the X coordinate. In other words, this:
Code:
LDA newX
STA Object_x_hi,x
seems to be the issue, even though the corresponding Y-coordinate code is working just fine. Any ideas what I might be doing wrong?
Last edited: