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

#1 2011-09-16 21:28:09

pinipy
New Scratcher
Registered: 2011-09-11
Posts: 8

game help please!!!!!!!!!!!!!!!!!!!!!!!!!

i need to know this.
how do i make it that the apples fall from the tree and when it touches player one or player two it hides ande you get a point score and the score goes up and the appples keep falling untill one touchs the ground. players need to move using the left and right arrows too.

Offline

 

#2 2011-09-16 21:46:42

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: game help please!!!!!!!!!!!!!!!!!!!!!!!!!

Give each player this script:

When Green Flag Clicked:
forever {
if <key [left arrow] pressed> {
change x by (-1).  }
if <key [right arrow] pressed> {
change x by (1).  }  }

That will create the movement.  If you need it to move faster, change the numbers to bigger ones.

Have a showing variable called score.  This will display the score.  Make the ground a UNIQUE color (nothing else has that color), and figure out what coordinates the apples go to on the tree.

Give the apple this script:

When Green Flag Clicked:
forever {
go to x: (coordinate here) y: (coordinate here).
repeat until <touching color [ground's color] or <touching [Player1] or <touching [Player2]>>> {
change y by (-1).
(make that a bigger number to make them fall faster).  }
if <touching [ground color]>  {
stop all.  }
else {
change [score] by (1).  }  }

I hope that made sense.   tongue

Last edited by Greenatic (2011-09-16 21:47:44)

Offline

 

#3 2011-09-16 22:26:31

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: game help please!!!!!!!!!!!!!!!!!!!!!!!!!

One little addition: you can replace "touching [ground color]" with "touching ground" (so it is geared towards touching a sprite rather than a color).


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#4 2011-09-17 21:20:02

pinipy
New Scratcher
Registered: 2011-09-11
Posts: 8

Re: game help please!!!!!!!!!!!!!!!!!!!!!!!!!

Give each player this script:

When Green Flag Clicked:
forever {
if <key [left arrow] pressed> {
change x by (-1).  }
if <key [right arrow] pressed> {
change x by (1).  }  }

That will create the movement.  If you need it to move faster, change the numbers to bigger ones.

Have a showing variable called score.  This will display the score.  Make the ground a UNIQUE color (nothing else has that color), and figure out what coordinates the apples go to on the tree.

Give the apple this script:

When Green Flag Clicked:
forever {
go to x: (coordinate here) y: (coordinate here).
repeat until <touching color [ground's color] or <touching [Player1] or <touching [Player2]>>> {
change y by (-1).
(make that a bigger number to make them fall faster).  }
if <touching [ground color]>  {
stop all.  }
else {
change [score] by (1).  }  }

I hope that made sense.   
could somebody please translate this into scratch blocks i am very new and i dont understand this.

Offline

 

#5 2011-09-17 23:51:24

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

Re: game help please!!!!!!!!!!!!!!!!!!!!!!!!!

pinipy wrote:

Greenatic wrote:

Give each player this script:

When Green Flag Clicked:
forever {
if <key [left arrow] pressed> {
change x by (-1).  }
if <key [right arrow] pressed> {
change x by (1).  }  }

That will create the movement.  If you need it to move faster, change the numbers to bigger ones.

Have a showing variable called score.  This will display the score.  Make the ground a UNIQUE color (nothing else has that color), and figure out what coordinates the apples go to on the tree.

Give the apple this script:

When Green Flag Clicked:
forever {
go to x: (coordinate here) y: (coordinate here).
repeat until <touching color [ground's color] or <touching [Player1] or <touching [Player2]>>> {
change y by (-1).
(make that a bigger number to make them fall faster).  }
if <touching [ground color]>  {
stop all.  }
else {
change [score] by (1).  }  }

I hope that made sense.

could somebody please translate this into scratch blocks i am very new and i dont understand this.

Does this help?

http://i.imgur.com/cBV2t.gif


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

Offline

 

Board footer