Pages: 1
Topic closed
Hey fellow Scratchers, I am just wondering how do I make my background change when a Sprite runs into something? (e.g, it's a maze and I get to the finish, and I wanna make another level to it).
Thanks for your help,
Jared.
Offline
Tell the sprite this,
When Green Flag Clicked forever if touching color [ ] broadcast [Broadcast Name]
An alternative is this...
... forever if touching [Any Sprite] ...
Hope that helps!
Last edited by Chrischb (2009-09-10 02:02:20)
Offline
Broadcast's are in the control tab of the scripts,
they look like this [blocks]
<broadcast[ Watever ]
[/blocks]
Offline
Ok, I've got that working fine and all now, just one more problem, when I run into my block thingy that changes the background, it goes haywire and flashes really fast through the two backgrounds I have worked on so far, and when I come of the block, it sometimes can be on the same background. Ideas?
Offline
Hehe... OK. Scratch is all about playing around and seeing what works. You'll get better at this the more you work on it.
See the forever block? That means that your costume will change everytime the sprite touches the object. In Scratch, the sprite, in some cases, the sprite can touch the object for long enough to have the action performed more than once. In your case, it's the scene change. To stop this, I would insert a 'Stop Script' block directly beneath the 'broadcast' block. This will make sure the action only happens once.
Hope that helps.
Just call out if you've got anymore problems.
- BlueFlame
Offline
Topic closed
Pages: 1