The Red Koopa

ZeGGamer1

New member
Hey, so I'm sure everyone here has beaten, or at least played Super Mario Bros. One of the enemies in that game is the red Koopa, who turns around when he reaches an edge. does anyone know how to do that in NESmaker? I know that the monster lock does something like this, but I want to limit this action to one enemy, and when you jump in or around the tile your character does weird movement to say the least.

If anyone could help that would be appreciated.
 
This thread should solve you dilemma.
http://nesmakers.com/viewtopic.php?f=3&t=1317&p=8477&hilit=Monster+block#p8477
 

ZeGGamer1

New member
Redherring32 said:
This thread should solve you dilemma.
http://nesmakers.com/viewtopic.php?f=3&t=1317&p=8477&hilit=Monster+block#p8477

Thanks that worked, but how do I limit it to one specific monster?
 
ZeGGamer1 said:
Redherring32 said:
This thread should solve you dilemma.
http://nesmakers.com/viewtopic.php?f=3&t=1317&p=8477&hilit=Monster+block#p8477

Thanks that worked, but how do I limit it to one specific monster?

I wouldn't know how to go that deep, the best I can come up with is setup a "koopa flag",
So the game knows that a monster is a koopa, or whatever it is you're making.
I've had somone do basically that, for my game.
 

ZeGGamer1

New member
Redherring32 said:
ZeGGamer1 said:
Redherring32 said:
This thread should solve you dilemma.
http://nesmakers.com/viewtopic.php?f=3&t=1317&p=8477&hilit=Monster+block#p8477

Thanks that worked, but how do I limit it to one specific monster?

I wouldn't know how to go that deep, the best I can come up with is setup a "koopa flag",
So the game knows that a monster is a koopa, or whatever it is you're making.
I've had somone do basically that, for my game.


I'm sorry, but I'm still very new to NESmaker, how would you do something like that?
 
ZeGGamer1 said:
Redherring32 said:
ZeGGamer1 said:
Thanks that worked, but how do I limit it to one specific monster?

I wouldn't know how to go that deep, the best I can come up with is setup a "koopa flag",
So the game knows that a monster is a koopa, or whatever it is you're making.
I've had somone do basically that, for my game.


I'm sorry, but I'm still very new to NESmaker, how would you do something like that?

Ill ask around, because I myself cannot do it. :lol:
 

dale_coop

Moderator
Staff member
The "Monster Block" type tile is what you would need to block your monster from falling.
But, yeah, I understand that for your specific case, you would like just Red Koopa are blocked and not the others monsters, right?

What you could do is have a flag "Ignore Monster Block" for your Monster's action steps, like the "ignore gravity/ignore solids/..." flags, that would make your OTHER monsters ignore the Monster Block type tiles...

We could use, for example, the currently unused "action step flashed 05".
2018-12-02-11-01-52-Monster-Animation-Info.png



Here's how to do that:

1) Make or modify the "MonsterBlock.asm" script, modify like that:

Code:
;; MONSTER BLOCK	
	;;; skip monster block if player
	LDA Object_flags,x
	AND #%00001000 ;; is it a monster?  
	BEQ skipMonsterBlock;; skip monster block if not a monster
	
	; to ignore monster block :
	LDA Object_vulnerability,x
	AND #%00100000  ;; check if "Action Step Flag 05"
	BNE skipMonsterBlock  ;; if it IS 
	
	;; else if it is NOT
	;; ETC
	;; do any other checks here.  Is there a bit you want to use to determine
	;;; whether or not specific monsters ignore monster blocks?  like flying monsters, etc?
	LDA #TILE_SOLID
	STA tile_solidity
	
skipMonsterBlock:
	RTS


2) If you didn't yet, assign this script to an unused "Tile Types" in "Project Settings > Project Labels" (maybe the "Null - Walkable 11"?)

2018-12-02-11-21-11-Project-Settings.png


3) In "Project Settings > Project Labels", rename the Monster Action Step Flag 05 to "Ignore Monster Block":

2018-12-02-11-02-33-Project-Settings.png


4) Now, for your other monsters, if you want, you have the possibility to set the "Ignore Monster Block" flag (for every action steps your monsters uses):

2018-12-02-11-03-36-Monster-Animation-Info.png
 
Thanks Dale, I knew that's what needed done, I just can't do assembly. :lol:
Hopefully that'll sorts out the issue!
 
Top Bottom