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
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.
Last edited by Greenatic (2011-09-16 21:47:44)
Offline
One little addition: you can replace "touching [ground color]" with "touching ground" (so it is geared towards touching a sprite rather than a color).
Offline
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
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?
Offline