[4.1] Adding Monster Locks for your game (Basic core)

User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by dale_coop » Sat Apr 13, 2019 9:56 am

If there is no monster on your screen when yo u re-enter, but the monster lock are still here:
Just be sure that your "TILE_xxxx" constants are correctly set.
- the "TILE_MONSTER_LOCK": the monsterLock tile in your tileset.
- the "TILE_MONSTER_LOCK_OFF": the tile used when the monsterLock is removed.
(cf again my op)

If your monsters are here... it's normal, the screen is NOT trigger when you kill all monsters... you could make a TriggerScreen tile and put on your screen, just after the monster lock... (somewhere your player will walk through).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
clay
Posts: 9
Joined: Wed Aug 14, 2019 4:21 am

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by clay » Sun Aug 18, 2019 2:01 am

Hello. Will this work if I've changed locked doors to warpdoors? I notice the updated warpdoor asm (around line 128 of 'LoadCollisionBytes.asm') and this updated 'LoadCollisionBytes' are occupying the same space. The warpdoor change I found in this thread (change locked door to locked warp):

http://nesmakers.com/viewtopic.php?f=60&t=2591&p=16300&hilit=door#p16300
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by dale_coop » Mon Aug 19, 2019 8:31 am

In that case, you will have to modify the "CheckTriggeredColLoads_DC.asm" script (assigned to the "Handle Triggered Collisions" element in the Project Settings > Script Settings), the line 5, replacing the:

Code: Select all

	LDA #$00
	STA temp ;; set it to a walkable tile.
with:

Code: Select all

	LDA #$06
	STA temp ;; set it to a warp tile.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
mouse spirit
Posts: 48
Joined: Tue May 12, 2020 1:13 am
Location: Ohio,North America
Contact:

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by mouse spirit » Wed Jun 24, 2020 2:32 am

dale_coop,thank you. When i leave an come back to the screen the locks do work buuut they have the same tile as locked ones.I have rechecked my constants
Doing a platformer in 4.1.5..
I am game, hear me blip.

WIP my game Star Rider
https://www.mediafire.com/file/phef252j ... p.zip/file
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by dale_coop » Wed Jun 24, 2020 7:49 am

You need to change the TILE_MONSTER_LOCK constant value... to match the tile index you use for your monster locks (in your tileset: display the 8x8 grid and count the tiles from 0).
If you can't find the right value, could you share a screenshot of your bg tileset with with the grid?
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
mouse spirit
Posts: 48
Joined: Tue May 12, 2020 1:13 am
Location: Ohio,North America
Contact:

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by mouse spirit » Thu Jun 25, 2020 12:29 am

I do see what you mean but i have tried.I will try again right now.One problem may be that im painting the tile "Monster Lock" over whatever tile i want on the current screen.But i did also make an asset and try it. I tried a few things but just couldn;t fix this. If i had to guess,id say its a screen load thing or something.I think nn the new 4.5 tutorials there was something similar with lock blocks.I will watch them again and see if that can help me here in any way also.
Untitled-7.png
Untitled-7.png (87.1 KiB) Viewed 63 times
Untitled-1.png
Untitled-1.png (92.76 KiB) Viewed 68 times
Untitled-2.png
Untitled-2.png (62.02 KiB) Viewed 68 times
Untitled-3.png
Untitled-3.png (61.87 KiB) Viewed 68 times

Now i leave and return to that screen and the lock tiles are back but NOT solid.
Untitled-4.png
Untitled-4.png (61.31 KiB) Viewed 68 times
Untitled-5.png
Untitled-5.png (91.34 KiB) Viewed 67 times
Untitled-6.png
Untitled-6.png (75.57 KiB) Viewed 65 times
I am game, hear me blip.

WIP my game Star Rider
https://www.mediafire.com/file/phef252j ... p.zip/file
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by dale_coop » Thu Jun 25, 2020 7:54 am

Checking you bg tileset, the tile you use for your "Monster Lock" is the #14:`

Image


So, try to set the "TILE_MONSTER_LOCK" constant value to "14":

Image

I think it should work better, now.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
mouse spirit
Posts: 48
Joined: Tue May 12, 2020 1:13 am
Location: Ohio,North America
Contact:

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by mouse spirit » Fri Jun 26, 2020 8:40 pm

Understood.I will try tonight and edit this post with a response.Thank you dale.

Edit: Works great.My issue is resolved for an asset.Does this mean that i cant paint a monster lock?Should i strictly use the same graphic spot(14)?
I am game, hear me blip.

WIP my game Star Rider
https://www.mediafire.com/file/phef252j ... p.zip/file
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.1] Adding Monster Locks for your game (Basic core)

Post by dale_coop » Sun Jun 28, 2020 4:41 pm

It would be easier to use always the same gfx (or the same spot in all your tilesets), yeah.
But if you want/need to use another one, it's doable, you will have to do some modification in the code (add a new TILE_MONSTER_LOCK_2 and a few lines of code in the CheckTriggeredTileLoads_DC.asm script)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
Post Reply