monsters activating warp tiles

stevenshepherd

New member
Pretty much what the subject says: When monster hits a warp tile, I get warped out of the room. not sure if I am doing something wrong or if this is just a beta bug/something that isn't ironed out yet.
 

Mihoshi20

Member
Hmm, though I imagine that's not intended behavior, I do like the concept. Used as a sort of pseudo timer to complete a task before the monster reaches the warp point and teleports you out. Sort of like the 'monster reaches the girl' timer from the game Blue Print.
 

stevenshepherd

New member
For sure! It definitely could be useful, but perhaps not ideal as a default :) Assuming it is a bug and is fixed, it would be great to still have this functionality as an option. It could definitely be used for all kinds of creative things, like you suggested!
 

dale_coop

Moderator
Staff member
LOL, quite funny behavior. I found a fix, if you don't want your monsters trigger the warp: modify the "TileType04.asm" script (located in the folder "GameEngineData\Routines\UserScripts\TileTypes") as :
Code:
;;;WARP TO SCREEN
;; the screen to warp to is set in screen info
			CPX player1_object
			BNE skipWarp
			LDA #%11000000
				;7 = active
				;6 = 8 or 16 px tiles
			ORA #GS_MainGame
			ORA #%01000000
			STA update_screen
			LDA #%00000001
			STA update_screen_details ;; load from map 1
			LDA warpToScreen
			STA newScreen
			STA currentScreen
			LSR
			LSR
			LSR
			LSR
			LSR
			STA screenBank
			LDA #$02
			STA screen_transition_type
	LDA #$01
	STA tile_solidity
	LDA #$00
	STA gameHandler
skipWarp:
	LDA #$01
	STA tile_solidity

If I am not mistaken, now the script will check if the warp tile is triggered by the player 1 before warp (if it's not the player 1, the script jump to a sub routine that say to consider it as a normal solid tile).
 

RadJunk

Administrator
Staff member
That's exactly how you would fix this problem. Great job. :)

One thing - you do NOT have to set the solidity twice. So you could actually remove the first LDA #$01 STA tile_solidity inside the game-state change code, since it would just logically flow right into the skip warp part of the code (it'll do that either way, the way this is set up). So this is just wasted byte data, doing things twice.

But yeah, good job :)
 

RadJunk

Administrator
Staff member
Not so much a correction as it is an optimization. All you did was make that part redundant.

Have you toyed with ASM before? i can't remember. If not, I hope things like this give you some confidence that it's not all that bad! haha
 

dale_coop

Moderator
Staff member
No, ASM it's a first time for me.
But I know coding (I am a developer, Delphi -pascal object- language mostly).
I watched your dev videos, your nesmaker videos, ... Now I start to learn/understand more with NesMaker, it's very instructive.
 

mouse spirit

Well-known member
STA tile_solidity at the end was making an unintended thing happen. When an NPC was on the tile, it would be solid! Simply commented it out. Thank you dale_coop and Joe.
Now i have working town house doors!
 
Top Bottom