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

#1 2012-02-09 08:28:01

Miku-Chan9599
New Scratcher
Registered: 2012-02-09
Posts: 6

My Science Game

For school, I need to make my own Game/Program.
Me and my partner decided (Actually she forced me to), to make a Science Game that is educational for 6th graders. Now, but I need help with this. I've chosen an experiment already, so don't bother looking for that.

We've decided to have a list in the order the chemicals will have to be put into the empty beaker. If they don't put it in the correct order, the experiment shall explode.

But those are the skills I'm lacking at. I don't exactly know how to do that. So could maybe someone help me with that?  smile

Offline

 

#2 2012-02-09 10:04:16

Anonymuss
New Scratcher
Registered: 2012-02-09
Posts: 4

Re: My Science Game

its really quite simple!
Say you chose magnesium and hydrochloric acid (IDK, but that looks nerdy to me) you would do this, although there may be a simpler way.

First, make 2 variables and 2 buttons, 1 called 'Magnesium' and the other 'acid' and it would just go like this: (if you want, you can also add FAIL and SUCCESS variables)

For the magnesium button:

When magnesiumbutton clicked
if <acid = 1>
set magnesium to 2
else
if <acid = 0>
set magnesium to 1
For the acid button:

when acidbutton clicked
if <magnesium = 1>
set acid to 2
else
if <magnesium = 0>
set acid to 1
to put in background:

when gf clicked
wait untill <magnesium = 1 or magnesium = 2 and acid = 1 or acid = 2>
if <magnesium = 1 and acid = 2>
set FAIL to 1
else
if <magnesium = 2 and acid = 1>
set SUCCESS to 1
(The code dosen't look right, i know. but that was the best i could do  big_smile )

phew! Did i say simple? anyway, that should help. If you need me to run through it I'd be happy to. But quite simply, all that does is detects what order you press the two buttons in. if you do magnesium before acid, you fail. if you do it the other way around, you win! It's simple to me anyway.

Hope this helps  big_smile
-Anonymuss

Offline

 

#3 2012-02-09 10:20:23

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: My Science Game

delete [all] of [solution v]
add [ingredient 1] to [solution v]
add [ingredient 2] to [solution v]
add [ingredient A] to [solution v]
add [ingredient B] to [solution v]

delete [all] of [guessed_solution v]
add [User Ingredient] to [guessed_solution v]
set [i v] to (1)
set [correct v] to (1)
repeat <length of [solution v]>
    if <<item (i) of [guessed_solution v]> = <item (i) of [solution v]>>
        do nothing
    else
        set [correct v] to (0)
    end
    change [i v] by (1)
end
That's how I would do it. Or at least something similar.

Last edited by Magnie (2012-02-09 10:22:03)

Offline

 

#4 2012-02-09 21:51:18

MathMaster101
Scratcher
Registered: 2011-10-29
Posts: 100+

Re: My Science Game

hey i'm also in 6th grade. Our school hasn't done chemistry so i guess that its safe to say that america is almost failing in education. I hope not since my ancestry really makes me need to work hard


https://sphotos.xx.fbcdn.net/hphotos-snc6/c39.0.403.403/p403x403/196165_191956434263692_1014187386_n.jpg

Offline

 

Board footer