Breakable tile problem...

digit2600

Member
Having an issue writing a tile script for breaking tiles with sprite weapon...

It works when standing on top of the tile, but not when standing next to it.

I'm unsure how to tell it
If spriteWeapon_x == this._x...

(Basically I just want to be able to break bricks with my crowbar)

At the moment, I got this:
LDA #TILE_SOLID ; loads tile
STA tile_solidity; stores solid

LDA crowbar ; loads crowbar var
CMP #%00000100 ; got it ?

BNE stillsolidA ; if you don't have it go away
LDA currentWeapon ; loads selected weap
CMP #$02 ; is it the crowbar ?
BNE stillsolidA ; if not, go away
LDA gamepad ; obviously
CMP #%00000010 ; b button pressed?

BNE stillsolidA ; if not, kick rocks
LDA #$00 ; but if it is, load new tile
STA tile_solidity ; and make it notSolid
ChangeTileAtCollision #$00, #$00
stillsolidA:
 

dale_coop

Moderator
Staff member
What version of code is that? NESmaker 4.1.5?
Sorry, you should use the latest version of NESmaker if you want us to be able to help you. Specially if you're starting a new project.
 

digit2600

Member
What version of code is that? NESmaker 4.1.5?
Sorry, you should use the latest version of NESmaker if you want us to be able to help you. Specially if you're starting a new project.
I would, but... it's from a project I started years ago, and would take me absolutely forever to rewrite it for the new version :--/
 
Top Bottom