Pages: 1
Topic closed
I'm trying to create a math quiz using Scratch for my students. When the next button is clicked, it is suppose to load a new background with a new question. How do i go abt to do it?
Offline
ok add these blocks to the button
<when[ button ]clicked>
<broadcast[ next back ground
and on your scene add these blocks
<when I receive[ next background
<switch to background[ ---- the back ground you made
Offline
themaker123 wrote:
ok add these blocks to the button
<when[ button ]clicked>
<broadcast[ next back ground
and on your scene add these blocks
<when I receive[ next background
<switch to background[ ---- the back ground you made
Yep that sounds right...here is a little longer explanation:
When you click on your object, you can have it send a message (called a broadcast in Scratch) to another object/background that says "change your costume"
When the second object/background receives the message "change your costume" it will do that.
(You will also need to create a 2nd background for your stage)
You will need to create a script in each.
The object being "clicked" will need a script that says:
When sprite clicked
broadcast [write in whatever you want..."change background" would be good]
The stage will need a second script that says:
When I receive [the message you wrote..."change background"]
switch to [background2]
Hope this helps!
Offline
nkc wrote:
this is no help to me
It isn't extremely clear for multiple backgrounds. lemme give it a whack.
So you are doing a quiz? Well, that would be many questions. I'll show you 10 questions. When it loads, question one will show. Now when you click the right answer, it will switch the level variable. The background ALWAYS switches to the level variable. Like this:
<switch to costume[ <{ level }>
But instead it is Switch to Background. Now you base if a question is correct or not on what level it is. I also made one for school, kinda like Jeopardy, where you click a square. I used this account I think.
Offline
Topic closed
Pages: 1