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

#1 2008-10-04 16:53:08

My-TV
Scratcher
Registered: 2008-09-21
Posts: 17

troubleshooting

I want a sprite to touch somthing and the background change but when i do backround and copy the block to the sprite it turns red and does not work! HELP!<say[ HELP!!!!!

Offline

 

#2 2008-10-04 21:33:05

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: troubleshooting

That's because when you copy a script with from the background with a "change background" script to a sprite, the sprite can't use the block because it isn't in the list of blocks sprites can have so it returns an error (the red outline). The equivalent of change background to a sprite is "change costume", so you either have to change the background-only block to the change costume block, or you remove the change background block altogether.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#3 2008-10-04 21:36:23

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: troubleshooting

One way to do it is to have the sprite send a Broadcast message when it touches the item.  Then, set the Stage up with a "When I Receive" block that changes the background when it gets the message.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-10-05 06:06:26

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: troubleshooting

Sprite:
<when green flag clicked>
<forever>
<if> <touching[ edge
<broadcast[ change background

Background:
<when I receive[ change background
[next background]

Last edited by registeel (2008-10-05 06:06:57)

Offline

 

#5 2008-10-05 19:35:18

My-TV
Scratcher
Registered: 2008-09-21
Posts: 17

Re: troubleshooting

THANKS EVERYONE FOR HELPING ME!

<say[  U GUYS ROCK!

Offline

 

Board footer