Suppose I had two lock blocks... [4.5.2]

jataka5000

New member
Followed tutorial 4 https://www.thenew8bitheroes.com/post/adventure-game-basics-part-4-lock-blocks (and also the update in tut7).

If I put two (or more) of the lock block assets on the screen (and two keys), with collision type 06 (named lock block, as done in tutorial), then opening one lock block per key is possible, but if I only unlock one lock block, leave the screen, come back -- all lock blocks are gone.
Also, the subpalettes changed for my player. Upper left follows a different subpalette, and the other 3 quadrants are some other color, but I don't see where it is defined like this. Certainly nothing like that in the Game Objects / Player menu.

Also, there must be a way to put more than 4 objects on a given screen.. we put a key as one of the monsters. But if we wanted to have many keys on the screen, we wouldn't be able to use this approach.

I'd like to understand what is going on, as I want to develop deeper understanding than the surface level that I have now...
 

dale_coop

Moderator
Staff member
You can't have multiple different doors (locked tiles) on the same screen...
A lock tile is a solid block that can be removed if you have at least 1 key. When you touch the lock tile, it triggers the screen and decreases your key counter. Any key will open any door (the code is just if the key counter > 0 then removed the tile)
When you enter to a triggered screen, all the special tiles are removed (locked tiles,...)
You need to design it differently, place your locked tiles on different screens.
Also keep in mind that, when a screen is triggered all the screens that have the same "screen-type" value are triggered too.
So, don't forget to set different screen-type value in the screen "Infos".
 
Top Bottom