i want to use a sprite as a button so when i click it it broadcasts a answer to the program could you show me the coding to do so please
Offline
Hey, and welcome to Scratch, Lilhardy94! Actually, since this topic is about script help, it belongs in the Help With Scripts forum section. I've asked a community moderator to move it there, so that's where you'll probably find it next time you look for this topic.
You'll want to first do this script:
when gf clicked showon the sprite button. (You'll also want to make sure the sprite isn't blank, change it in the costume tab)
When (sprite1) clicked broadcast (broadcast1)And then to make it do something when the broadcast is sent, build onto this:
When I receive (broadcast1)
Last edited by stevetheipad (2012-04-23 11:04:16)
Offline
I've just moved this over to the "Help with Scripts" forum, for you, Lilhardy94
And may I say: Welcome to Scratch!
Under the yellow "Control" section of the Scratch program, you should see this block:
when sprite clickedTo use it with a broadcast, attatch a broadcast block to the bottom:
when sprite clicked broadcast [message v]Wow. I totally failed to get the block to work in this post! Stevetheipad has answered the question above while I was writing, though, so listen to him!
Last edited by sparks (2012-04-23 11:05:43)
Offline
sparks wrote:
Wow. I totally failed to get the block to work in this post! Stevetheipad has answered the question above while I was writing, though, so listen to him!
Hehe, I beat-cha to it.
And sparks: use "When (sprite) clicked" instead of "When sprite clicked", and broadcast names live in parenthesis, too.
Offline