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
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!
Offline
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
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.
Offline