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

#1 2011-05-30 10:16:13

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Help!

I am trying to make a trivia game. I've got all the coding for if it's a right answer but I don't know how to code it if it's a wrong answer! Please Help!

Offline

 

#2 2011-05-30 10:38:25

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help!

Code:

If answer = correct_answer
    (got it correct scripts here)
else
    (got it wrong scripts here)
End If

Is that what you're looking for?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-05-30 11:05:22

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Re: Help!

Kind of. I don't really undertand teh second part of what to do if teh answer is something other than the correct one. (I know, super typos  tongue ) I took a picture of the scripts but I don't know how to put it on the forums yet. I don't even think I can. Since I'm a new scratcher. But, I didn't join today  sad

Offline

 

#4 2011-05-30 11:38:31

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Re: Help!

Oh you are offline, never mind. Lol

Offline

 

#5 2011-05-30 11:38:52

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help!

Lesstea33 wrote:

Kind of. I don't really undertand teh second part of what to do if teh answer is something other than the correct one. (I know, super typos  tongue ) I took a picture of the scripts but I don't know how to put it on the forums yet. I don't even think I can. Since I'm a new scratcher. But, I didn't join today  sad

You can put a link to the image but you can't directly post images as a New Scratcher. You'll be a Scratcher soon enough though; just stay active on Scratch.

Basically, that script I posted has a second part of the block called "else". Whatever is put in the "else" section will happen if "answer = correct_answer" is not true. Understand now?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#6 2011-05-30 12:16:58

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Re: Help!

Oh yeah. SO if you put "if answer=else" that codes it to make it so that if you put anything other than the answer its wrong?

Offline

 

#7 2011-05-30 12:19:21

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help!

Hm... I'm not exactly sure what you mean. Hold on, and I'll post an image that should explain it a bit better.

Last edited by Harakou (2011-05-30 12:19:30)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#8 2011-05-30 12:23:20

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Re: Help!

Can you format what it would look like in Scratch (blocks)

Offline

 

#9 2011-05-30 12:30:15

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help!

Yep. Just give me a minute.  smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#10 2011-05-30 12:41:42

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Re: Help!

Thanks a bunch. It's for a school project and I'll upload it when I'm done.  smile  I also want to become a scratcher. Im really into scratch and was too. (I didn't know how to word that lol) Also I think there shouldn't be a limit of 360 seconds before each post. Also wondering, can I add you?

Offline

 

#11 2011-05-30 12:52:55

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help!

No problem. The 360 second limit is only for New Scratchers, and is just there to prevent spam from people creating throwaway accounts. Once you're bumped up to Scratcher, the limit will be a much more reasonable 60 seconds. And yes, of course! You can add me (or anyone else) as a friend by going to their My Stuff page and clicking "Add to friends".

Anyway, here's the blockified form of the script I posted before, with explanations:

http://i51.tinypic.com/jtozmv.png


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#12 2011-05-30 20:06:19

Lesstea33
Scratcher
Registered: 2011-05-30
Posts: 20

Re: Help!

Thank you so much!!!

Offline

 

#13 2011-05-30 21:41:21

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help!

You're welcome!


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer