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

#1 2012-08-02 18:04:31

WoopAhhh
New Scratcher
Registered: 2012-07-19
Posts: 19

How to make update screen when a door is walked through? (For dummies)

I'm making a game, and I want the person to be able to walk into buildings while pressing arrow keys to walk.
I've asked a similar-ish question before, I think, but I just still don't understand. Please explain in simple, beginner terms.

Offline

 

#2 2012-08-04 07:40:10

Babado
Scratcher
Registered: 2011-09-15
Posts: 84

Re: How to make update screen when a door is walked through? (For dummies)

Uhm...

So, what I get: When someone walks through a door, you want it to open?

When [W v] key pressed
forever if 
touching [door v]
Broadcast [door v]
Then, on the door sprite put

When I recieve [door v]
switch to costume [costume2]
wait (2) seconds
switch to costume [costume1]
I had trouble doing this, so tell me if it works as well as you wanted it to.

Edit: Some of the blocks are red, I can't find the correct code for them.

Last edited by Babado (2012-08-04 07:49:59)

Offline

 

#3 2012-08-04 20:42:44

destructo-serpent
Scratcher
Registered: 2012-07-25
Posts: 1000+

Re: How to make update screen when a door is walked through? (For dummies)

what he said /\
                     I

+

when gf clicked
forever
if <touching character> //srry about the red, im not very good with block syntax
 broadcast [building v]

Offline

 

#4 2012-08-04 20:46:29

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: How to make update screen when a door is walked through? (For dummies)

destructo-serpent wrote:

what he said /\
                     I

+

when gf clicked
forever
if <touching [character v]?>
broadcast [building v]

fixed


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#5 2012-08-04 21:16:03

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to make update screen when a door is walked through? (For dummies)

Babado wrote:

Uhm...

So, what I get: When someone walks through a door, you want it to open?

When [W v] key pressed
forever if <touching [door v]?>
Broadcast [door v]
Then, on the door sprite put

When I receive [door v]
switch to costume [costume2]
wait (2) secs
switch to costume [costume1]
I had trouble doing this, so tell me if it works as well as you wanted it to.

Edit: Some of the blocks are red, I can't find the correct code for them.

Fixed.

Last edited by ErnieParke (2012-08-04 21:16:36)


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer