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

#1 2013-05-05 14:04:05

BlazingBlue
New Scratcher
Registered: 2013-04-29
Posts: 12

Is there a way to make it so a sprite can "loose" a life in the game?

Please post to let me know if there is! I'm kinda confused, and the project is due soon~

Offline

 

#2 2013-05-05 14:22:15

Maltese_Falcon
Scratcher
Registered: 2013-03-25
Posts: 100+

Re: Is there a way to make it so a sprite can "loose" a life in the game?

Make a variable called:

(Lives)
Then, at the beginning of the game, put:
Set [Lives v] to [3]//Or how many lives you want to start out with.
Forever//always check for:
If <touching [bad guy v]>
Go to x: [0] y: [0] //Reset your position
Change [Lives v] by -1
If <(Lives) = (0)>
Broadcast [Game Over v]
End
End

Offline

 

#3 2013-05-05 14:53:50

BlazingBlue
New Scratcher
Registered: 2013-04-29
Posts: 12

Re: Is there a way to make it so a sprite can "loose" a life in the game?

Alright, thank you very much!  smile

Offline

 

Board footer