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

#1 2011-06-07 15:26:30

hsider2
New Scratcher
Registered: 2011-06-07
Posts: 4

New To Scratch.. Need Help Immediately!

Hi there,
So I am new to scratch.
I just have a few questions regarding an assignment i am trying to complete.
I am making a number game with binary numbers.
The point of the game is to have 5 cards faced down and when you click on one card the binary number equivalent to the card will be shown, and the sum will be updates.
So when you click on all five cards, they all flip and show the number 31 in dots and are calculated as a sum.

I got half of the assignment figured out. when i click on the cards, they do flip and show the numbers, HOWEVER i cant figure out how to click on it again and have it go back to its original face down card. I used the "when card8 is clicked" [blocks]<when[ card8 ]clicked> block to make it flip but how do i get it to flip back when clicked again?

PLEASE HELP!!!!!

Offline

 

#2 2011-06-07 15:32:01

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: New To Scratch.. Need Help Immediately!

You can have a variable called "FaceUp?" for each card specifically, and set it to 0 initially for each one.  Now change your script like this:
http://i54.tinypic.com/2mredqp.gif

I don't know what you specifically did to make it face up, because I haven't seen the actual script, but to make it face down I assume you should just do the opposite.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2011-06-07 15:35:16

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: New To Scratch.. Need Help Immediately!

Assuming you're using costumes for the "flip", I would have the sprite detect the number of it's costume and then switch over to the appropriate costume based on it's appearance; but I can't tell if that's a good solution because I have no idea what the code looks like.

Could you show us a copy of the script you used for the card, or upload the project to the website so others can take a look? It's a lot easier to find a solution when we see the original blocks you used.  smile


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#4 2011-06-07 15:38:37

hsider2
New Scratcher
Registered: 2011-06-07
Posts: 4

Re: New To Scratch.. Need Help Immediately!

Thank you so much, I got it to work!!!

Offline

 

Board footer