Discuss Scratch

Kaydorf
New Scratcher
1 post

How can I make a key that opens a door?

Hello, how can I make a key that I can get it and then I can open a door to the next level? (Oh, and how can I do the next level?)
mstone326
Scratcher
1000+ posts

How can I make a key that opens a door?

I'd go one step at a time. First lets solve how to know if your main sprite has the key. I'd create a variable called, “have key?”, or something. When the program starts, “have key?” sets to 0 or no.

Then, program the key to wait until touching the main sprite and when it does set have to 1 or yes, and hide the key (make sure you show the key at the start of the program).

Then the door sprite will only respond if “have key?” = 1 or yes.

Once you get that part set, you can start looking at the next level. Also, if you can share your project that would help so we can see what you have so far and work within your scripts.
odhr1p
Scratcher
1 post

How can I make a key that opens a door?

what block makes the door change because of the variable
giloo94
Scratcher
38 posts

How can I make a key that opens a door?

hi
i look my project https://scratch.mit.edu/projects/405127723

the deal is 1:pick all coin with beettle
after that I show a key

you arrive at the deal 2
finding the good key as the same color of door

if you trying the bad key to open the door another key appear somewhere
for each level i limit for 3 the number of possible key to find

when you have the good key , you go to the next labyrinthe

open script of sprite key you can see how I do that

I hope I have helped you
good luck
sorry for my bad english
xMystic416
Scratcher
100+ posts

How can I make a key that opens a door?

giloo94 wrote:

-Snip-
Please don't necropost, especially if you're just advertising. I have reported this topic to be closed.

Powered by DjangoBB