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

Post Reply
User avatar
jataka5000
Posts: 15
Joined: Thu Jun 11, 2020 1:18 am

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

Post by jataka5000 » Sat Jun 27, 2020 6:55 pm

Followed tutorial 4 https://www.thenew8bitheroes.com/post/a ... ock-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...
User avatar
dale_coop
Posts: 5364
Joined: Fri Feb 16, 2018 7:05 am
Location: France

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

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

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".
-----
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