Monster Barriers

ZeGGamer1

New member
Hello. I've noticed that when a bullet collides with a monster barrier it destroys itself. This is fine if the barrier has a image, but when the barrier is so-posed to be invisible it fells weird when the bullet something that should be invisible to the player. Any Ideas?
 

dale_coop

Moderator
Staff member
You should modify your MonsterBarrier.asm script to that:
Code:
;;; SOLID
;;;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
	BEQ skipSolidRead
	LDA Object_flags,x	;; check the type of object
	AND #%00010100 		;; is it a player/monster weapon ? 
	BNE skipSolidRead	;; it IS, we skip	
	LDA #TILE_SOLID
	STA tile_solidity
skipSolidRead:	
	;; if you want it solid, declare it at the end
 

dale_coop

Moderator
Staff member
Have you modified the one your project actually uses?
(there a several monsterbarrier.asm scripts)
Check in "Project Settings > Script settings" for the "Tile Collision 04" element... to see which one is used.
 
Top Bottom