This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-07 19:01:35

mgrbarton
New Scratcher
Registered: 2012-05-11
Posts: 10

how to make a locked door!

I am trying to make a locked door that you can not go through!

Offline

 

#2 2012-06-07 19:12:15

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: how to make a locked door!

You need to give more details or else we cannot help. Can you open it? Is there a combination?

Offline

 

#3 2012-06-07 19:21:34

mgrbarton
New Scratcher
Registered: 2012-05-11
Posts: 10

Re: how to make a locked door!

You get a key to open it, but that is in a different place.

Offline

 

#4 2012-06-07 21:08:15

fetzer
Scratcher
Registered: 2009-06-11
Posts: 70

Re: how to make a locked door!

Oh-  it would be something like-  if sprite 1 touched key broadcast Key obtained. When Key obtained revcieved Key next costume (invisibel) 


Door:  when Key obtained recieved
If color (color of sprite 1)  touches color (color of door) Door open

Don't forget to put a forever n there

Offline

 

#5 2012-06-07 22:10:51

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

Re: how to make a locked door!

This simple!
On your door sprite...

when gf clicked
forever
if <touching [key v]?>
switch to costume [open door v]
end
end
From there, request any more help or add what you want!


-SOScratch
Scratch On!

Offline

 

#6 2012-06-07 23:08:27

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: how to make a locked door!

Or is it like a platformer, and you want the door to act like a wall?


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#7 2012-06-08 02:55:10

PhirripSyrrip
Scratcher
Registered: 2012-02-11
Posts: 100+

Re: how to make a locked door!

To make an object solid:

when gf clicked
forever
if <key [right arrow v] pressed ?>
change x by (10)
if <touching color [#000000] ?>//colour of wall or door
change x by (-10)
end
end
if <key [left arrow v] pressed ?>
change x by (-10)
if <touching color [#000000] ?>
change x by (10)


http://i46.tinypic.com/ao03lk.png

Offline

 

#8 2012-06-08 09:56:04

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: how to make a locked door!

There are many ways this can be done, by what means will the key open the door? Will you be holding the key out in plain sight? Or will it be an item in your inventory, hidden from view? When asking for help, always be as specific as possible, so you will get what you need.  smile


Why are the secret organizations getting all the attention?  mad

Offline

 

Board footer