Jonny
Well-known member
Limitations to this tutorial...
It's not perfect but it's a start if you're thinking of doing something similar to this...
This goes at the start of your hurtPlayer_MetroidVania.asm (I've only tried it for this module)
Make a copy before changing it, if you so desire.
Change the Monster Action Step Flag to whatever you'd like to call it.
For the action step where you do not want the player to be hurt (in this example, when the laser is OFF)
Select the flag in your Object details / Actions.
I hope someone found this interesting. It's not very advanced and more of a starter to manipulate into what you want.
Thanks to all the NesMaker gurus for all your help.
- This only works because I know the monster object is the 2nd object drawn to the screen ( #$01 ) as there are no others.
If you had pickups, other monsters etc you'd need to do something else to ensure you're loading that specific monster object. - Skips player hurt entirely so if you DID have another monsters on the screen it wouldn't be able to hurt you either.
Probably fixable with some extra checks but I'm only a beginner so still figuring that part out.
It's not perfect but it's a start if you're thinking of doing something similar to this...
This goes at the start of your hurtPlayer_MetroidVania.asm (I've only tried it for this module)
Make a copy before changing it, if you so desire.
Code:
LDX #$01 ;; LOAD OBJECT INTO X ;;
LDA Object_vulnerability,x ;; LOAD VULNERABILITY BYTE ;;
AND #%00000010 ;; ACTION STEP FLAG ;;
BEQ +harmlessCheck ;; CAN STILL HURT PLAYER ;;
JMP +skipHurt ;; SKIP HURTING PLAYER ;;
+harmlessCheck:
LDX player1_object ;; LOAD PLAYER INTO X ;;
Change the Monster Action Step Flag to whatever you'd like to call it.
For the action step where you do not want the player to be hurt (in this example, when the laser is OFF)
Select the flag in your Object details / Actions.
I hope someone found this interesting. It's not very advanced and more of a starter to manipulate into what you want.
Thanks to all the NesMaker gurus for all your help.