Issues with Lock Blocks and Keys

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
Post Reply
vanderblade
Posts: 109
Joined: Mon Jan 07, 2019 5:20 am

Issues with Lock Blocks and Keys

Post by vanderblade » Sat Jan 12, 2019 8:50 pm

I'm using 4.1 Adventure Module (with some changes courtesy of Dale), and I'm having a few issues with my lock blocks and key counter.

1) My lock blocks tend to trigger correctly, but whenever I return to the screen, the lock block graphic shows back up. It's still walkable (from being unlocked), but I obviously want the lock block to stay gone.

2) Some screens randomly add one to my key counter when I enter them. It's not screen number related, since I have unique screen numbers for every screen in my game. So, I'm not sure what is causing it. But it results in players having an abundance of keys and breaking the game in certain dungeons.

Anybody encounter any of these issues in the weeks since 4.1 hit? Any known solutions?
User avatar
dark_crow_66
Posts: 135
Joined: Wed Apr 18, 2018 1:59 pm

Re: Issues with Lock Blocks and Keys

Post by dark_crow_66 » Sat Mar 09, 2019 6:42 am

vanderblade wrote:
Sat Jan 12, 2019 8:50 pm
I'm using 4.1 Adventure Module (with some changes courtesy of Dale), and I'm having a few issues with my lock blocks and key counter.

1) My lock blocks tend to trigger correctly, but whenever I return to the screen, the lock block graphic shows back up. It's still walkable (from being unlocked), but I obviously want the lock block to stay gone.

2) Some screens randomly add one to my key counter when I enter them. It's not screen number related, since I have unique screen numbers for every screen in my game. So, I'm not sure what is causing it. But it results in players having an abundance of keys and breaking the game in certain dungeons.

Anybody encounter any of these issues in the weeks since 4.1 hit? Any known solutions?
Having Same issue with Key Tiles and lock block. Were you ever able to fix this?
User avatar
dale_coop
Posts: 5408
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Issues with Lock Blocks and Keys

Post by dale_coop » Sat Mar 09, 2019 11:33 am

In the "Project Settings > User constants", check the :
- TILE_INDEX_LOCK (the tile you are using for your door... it's the index from your tileset... count the 8x8 tiles from top left to bottom right starting from 0)
- TILE_OPENDOOR (the tile to use when the door is removed... if you don't know, use "0": the first tile of your tileset)
- COL_INDEX_LOCK (the tile type for your locked door... for example if "4 - locked door" then the value has to be "4")
-----
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
going2maine
Posts: 14
Joined: Fri Mar 29, 2019 12:51 am

Re: Issues with Lock Blocks and Keys

Post by going2maine » Tue Apr 09, 2019 8:49 pm

vanderblade wrote:
Sat Jan 12, 2019 8:50 pm
I'm using 4.1 Adventure Module (with some changes courtesy of Dale), and I'm having a few issues with my lock blocks and key counter.

1) My lock blocks tend to trigger correctly, but whenever I return to the screen, the lock block graphic shows back up. It's still walkable (from being unlocked), but I obviously want the lock block to stay gone.

2) Some screens randomly add one to my key counter when I enter them. It's not screen number related, since I have unique screen numbers for every screen in my game. So, I'm not sure what is causing it. But it results in players having an abundance of keys and breaking the game in certain dungeons.

Anybody encounter any of these issues in the weeks since 4.1 hit? Any known solutions?
Hi. Did you ever figure out either of these issues? I'm seeing them both on 4.1.5.
User avatar
saturdayxiii
Posts: 97
Joined: Wed Oct 31, 2018 4:03 pm
Location: Canada
Contact:

Re: Issues with Lock Blocks and Keys

Post by saturdayxiii » Fri Apr 12, 2019 5:58 pm

Dale's post right above you solves issue one. COL_INDEX_LOCK specifically, if your door is reappearing when returning to a triggered screen. The triggered screen script looks for the presence of that tile script number to determine which tiles need to be changed to TILE_OPENDOOR.

Issue 2, I've never experienced myself, so I'm not sure what's going on with that one.
game things
Mr. Spooks Tall House (mostly broken demo)
Pingback (mostly working demo)
other things
https://saturdayxiii.tumblr.com
Post Reply