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

#1 2011-08-10 18:36:00

Aezek
New Scratcher
Registered: 2011-08-10
Posts: 4

Hi, New to Scratch and wanting to know about making something.

Hi,

I am new to Scratch and I would like to know what I would need to do to make a Rock Paper Scissor game that would have 2 opponents vs each other (no human interaction except clicking green flag) and how to make the variable count the wins.

I know some basic stuff like making variables, but I don't know how to get them to work as required above.

Thanks a lot.

Offline

 

#2 2011-08-10 19:32:18

babbet
Scratcher
Registered: 2011-07-23
Posts: 100+

Re: Hi, New to Scratch and wanting to know about making something.

I'm not going to be much of a help because i don't know how to make variables
but i would suggest making something easier because I've been using scratch for some time and you need to make the script work on your sprite and it is complicated so i would make that a goal for the future,

good luck!


https://lh3.googleusercontent.com/-SBVvDiIX0PY/Tm6OBd27mnI/AAAAAAAABR4/b--gXKoPlkU/babbet400x150.jpg

Offline

 

#3 2011-08-10 19:37:56

Aezek
New Scratcher
Registered: 2011-08-10
Posts: 4

Re: Hi, New to Scratch and wanting to know about making something.

Hi babbet,

Thank you for the reply, I'm vaguely familiar with how to set scripts on sprites, and some other basic stuff, however this is important to make as it is required for my class.

Offline

 

#4 2011-08-10 19:48:15

cpumaster930
Scratcher
Registered: 2009-02-23
Posts: 100+

Re: Hi, New to Scratch and wanting to know about making something.

Aezek wrote:

Hi,

I am new to Scratch and I would like to know what I would need to do to make a Rock Paper Scissor game that would have 2 opponents vs each other (no human interaction except clicking green flag) and how to make the variable count the wins.

I know some basic stuff like making variables, but I don't know how to get them to work as required above.

Thanks a lot.

1. Make three variables, called P1, P2, and Result for simplicity.
2. Make a script that sets each variable to a random number from 1 to 3 using the "pick random" block.
3. Use game logic as follows, using a series of "if" blocks:
(We'll say that 1 = rock, 2 = paper, and 3 = scissors.)
If P1 = P2, then both players' moves are the same, so it's a draw. Set the variable Result to "Draw."
If P1 = 1 and P2 = 2, then set Result to "P2 Wins."
If P1 = 1 and P2 = 3, then set Result to "P1 Wins."
If P1 = 2 and P2 = 1, then set Result to "P1 Wins."
If P1 = 2 and P1 = 3, then set result to "P2 Wins."
If P1 = 3 and P1 = 1, then set Result to "P2 Wins."
If P1 = 3 and P1 = 2, then set Result to "P1 Wins."

That's the base code for it, just add graphics and a win/lose screen, and that's it!

The only difference between this and a player-input game is the random blocks.
If you still need help, I'd be more than happy to upload a base project for you.  smile


http://i.imgur.com/Qd0lu.png

Offline

 

#5 2011-08-10 20:12:03

Aezek
New Scratcher
Registered: 2011-08-10
Posts: 4

Re: Hi, New to Scratch and wanting to know about making something.

Thanks for the help, cpumaster930, It really pointed me in the right direction and helped me a lot.

I'm running into a problem with the results however.

I have uploaded my project here - http://scratch.mit.edu/projects/Aezek/1972175

It's not counting the results or announcing the winner properly for some reason, I tried with both if= Operators and now I'm using if=/else Operators, and still the same results.

Thanks!

Offline

 

#6 2011-08-10 23:54:05

cpumaster930
Scratcher
Registered: 2009-02-23
Posts: 100+

Re: Hi, New to Scratch and wanting to know about making something.

Aezek wrote:

Thanks for the help, cpumaster930, It really pointed me in the right direction and helped me a lot.

I'm running into a problem with the results however.

I have uploaded my project here - http://scratch.mit.edu/projects/Aezek/1972175

It's not counting the results or announcing the winner properly for some reason, I tried with both if= Operators and now I'm using if=/else Operators, and still the same results.

Thanks!

It seems you ran into a technical issue...apparently, the dog was calling the result out before the random numbers were picked, resulting in the dog displaying last round's results.  It's a weird glitch  hmm   There was also a script error in which you told the wrong variable to change.  wink

The fixed version is here.  Hope that helps  smile


http://i.imgur.com/Qd0lu.png

Offline

 

#7 2011-08-11 02:05:49

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Hi, New to Scratch and wanting to know about making something.

Welcome to scratch! It seems they helped you already. I would have but theres nothing more to add.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#8 2011-08-11 03:42:47

Aezek
New Scratcher
Registered: 2011-08-10
Posts: 4

Re: Hi, New to Scratch and wanting to know about making something.

Thanks for fixing that cpumaster930, really appreciate it!

Thanks JJROCKER!

Offline

 

#9 2011-08-12 06:16:24

doubleyourlikes
New Scratcher
Registered: 2011-08-12
Posts: 1

Re: Hi, New to Scratch and wanting to know about making something.

Lovely game really want to hear about soon

....................................
http://doubleyourlikes.blogspot.com

Offline

 

Board footer