TolerantX
Active member
I adapted this code from a previous NESmaker version
If someone who's more elegant with code would please like to add an updated code to exclude object #$01 (so your BULLET or MELEE or PLAYER 2 maybe is able to treat it as a NULL TILE ? ) Thank You.
If someone who's more elegant with code would please like to add an updated code to exclude object #$01 (so your BULLET or MELEE or PLAYER 2 maybe is able to treat it as a NULL TILE ? ) Thank You.
Code:
;;; SOLID Collision in this code it affects everything except player Adapted from NESmaker 4.1.5
;;;This is how to inform a solid collision.
;;; You can also add this to the end of
;;; any tile type if you want it to have an effect AND
;;; be treated like solid.
;;; You could also check to see if it is a non-player object,
;;; and only return solid if it's a not player. This would
;;; cause monsters to treat things like spikes or ladder or fire
;;; as solid while the player is able to interract with it.
CPX player1_object ;; is it the player 1?
BEQ skipSolidRead ;; if it is not player 1 go to skipSolidRead
;;;;;
LDA ObjectUpdateByte
ORA #%00000001
STA ObjectUpdateByte ;; makes solid
RTS
skipSolidRead:
;;;;; end of script