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

#1 2010-10-27 22:48:43

happyg01
Scratcher
Registered: 2010-10-27
Posts: 17

Help with my game

Im trying to create a game with objects failling down and you have to run left to right to catch it. And it has to have a count down time, lives and score count. how do i go about doing this any help will be gratefull.
how do i get the items to fall?
how to set up a time?
how to get a score?
how do i get it to lose life?
and how do i use variable?

Offline

 

#2 2010-10-28 01:25:29

2l84zwamani
Scratcher
Registered: 2010-09-27
Posts: 100+

Re: Help with my game

The items can fall with the following script:

When green flag clicked
Forever
If not touching colour colourofground or touching maincharacter
Repeat until touching colour colourofground or touching maincharacter
Change y by -3 (increase for more difficult)
EndRepeat
EndIf
EndForever

You can also make a few objects falling down by adding several sprites and adding this script:

When green flag clicked
Forever
If touching colour colourofground or maincharacter
Hide
Wait 1 sec
Go to x: pick random leftofscreen to rightofscreen, y: topofscreen
Wait until touching colour colourofground or maincharacter
EndIf

To set up a timer, make a variable called "Time" or whatever. Then add this script:

When green flag clicked
Set time to whatever
Repeat until time=0
Wait 1 sec
Change time by -1
EndRepeat

To set up the score, make a variable "Score" and add this script to the main character:

When green flag clicked
Forever
If touching objectfallingdown
Change score by whatever
Wait until touching objectfallingdown
EndIf


To make it lose lives, make variable "Lives" add this script to the falling downs:

When green flag clicked
Set Lives to whatever
Forever
If touching colour colourofground
Change Lives by -1
Wait until touching colour colourofground
EndIf
EndForever

I don't really get what you mean by the last question...
Hope I helped, and since I'm a sort-of newbie as well, tell me if there's something wrong!


I will be a Ms. Pickle Dr. Deadpebble Great Person <forever>
http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3 GROB THE SLIME WILL TAKE OVER THE WORLD!

Offline

 

#3 2010-10-28 07:00:10

happyg01
Scratcher
Registered: 2010-10-27
Posts: 17

Re: Help with my game

When green flag clicked
Forever
If touching colour colourofground or maincharacter
Hide
Wait 1 sec
Go to x: pick random leftofscreen to rightofscreen, y: topofscreen
Wait until touching colour colourofground or maincharacter
EndIf



where is the x: lefttoscreen, rightoscreen, y: topofscreen

Offline

 

#4 2010-10-29 01:16:11

2l84zwamani
Scratcher
Registered: 2010-09-27
Posts: 100+

Re: Help with my game

In the program (not sure about presentation mode and online), the left of the screen is about x: -240, the right (now obviously) is x: 240 and the top of the screen is about y: 180.


I will be a Ms. Pickle Dr. Deadpebble Great Person <forever>
http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3http://is.gd/d55N3 GROB THE SLIME WILL TAKE OVER THE WORLD!

Offline

 

Board footer