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

#1 2010-10-29 00:19:50

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Help with scoring and lives

Im creating a game were u have 2 catch items. But im having a problem with creating score and lives.  can i get a guide into doing this

thanxs

Offline

 

#2 2010-10-29 01:14:48

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Help with scoring and lives

Create a variable each for score and lives, and increase them when you need to.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-10-29 01:28:36

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

Re: Help with scoring and lives

Make something like

When greenflag clicked
Set score to 0
Set time to either 0 or for a countdown 20 or whatever
Forever
If <don't catch anything>
Change score by -1
Wait until <don't catch anything>
EndIf

When greenflag clicked
Forever
Wait 1 sec
Change time by -1 (or +1 depending on if you want it countdown or count-up)


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

 

#4 2010-10-29 02:43:20

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

I did what you said but my life only goes down after a few hits and my score will only go up a few catches what am i doing wrong

this is what i did

When i recieve START GAME
set score to 0
forever
if  touching food or food 1
change score by 2
wait until touching food or food 1
end if
end forever

Offline

 

#5 2010-10-29 02:49:56

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

Re: Help with scoring and lives

Maybe something wrong with my "wait until" script? Ask someone ... more advanced  wink


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

 

#6 2010-10-29 04:44:39

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

k thanxs

Offline

 

#7 2010-10-29 15:20:48

lasc12
Scratcher
Registered: 2007-11-18
Posts: 100+

Re: Help with scoring and lives

shera wrote:

I did what you said but my life only goes down after a few hits and my score will only go up a few catches what am i doing wrong

this is what i did

When i recieve START GAME
set score to 0
forever
if  touching food or food 1
change score by 2
wait until touching food or food 1
end if
end forever

Try taking out the wait until block. I'm having a little trouble visualising this, so my answer may be wrong.


Thus I have spoken.

Offline

 

#8 2010-10-30 00:14:19

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

I tried taking out wait until block and nothin is happening

Offline

 

#9 2010-10-30 00:37:13

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

When making the life or score variable do I do it for "only this sprite" or "for all sprites"?
and do i put the script on the falling items for the sprite that is meant to catch it?

Offline

 

#10 2010-10-30 02:06:23

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

Re: Help with scoring and lives

Doesn't matter  smile


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

 

#11 2010-10-31 17:38:53

ruggboy1
Scratcher
Registered: 2010-09-24
Posts: 61

Re: Help with scoring and lives

2l84zwamani wrote:

Make something like

When greenflag clicked
Set score to 0
Set time to either 0 or for a countdown 20 or whatever
Forever
If <don't catch anything>
Change score by -1
Wait until <don't catch anything>
EndIf

When greenflag clicked
Forever
Wait 1 sec
Change time by -1 (or +1 depending on if you want it countdown or count-up)

That's what I do.

Offline

 

#12 2010-10-31 18:03:53

lasc12
Scratcher
Registered: 2007-11-18
Posts: 100+

Re: Help with scoring and lives

Can you share it? I can look at it.


Thus I have spoken.

Offline

 

#13 2010-10-31 18:07:30

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

http://scratch.mit.edu/projects/shera/1384540
here the link

Offline

 

#14 2010-11-01 06:59:58

lasc12
Scratcher
Registered: 2007-11-18
Posts: 100+

Re: Help with scoring and lives

shera wrote:

http://scratch.mit.edu/projects/shera/1384540
here the link

Well, I looked at it. I have two questions.

1. What is wrong with it?
2. What's the point?

And here's another issue. The game is inappropriate. Quite a lot of alcohol references.


Thus I have spoken.

Offline

 

#15 2010-11-01 19:50:01

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

the issue with it is
1. it doesn't keep score. sometimes the score will jump to 40 while other times it doesn't go up
2. the life won't go down when hit.

the point of the game is to feed homer without feeding him his family.

I'll delete the game and just censore it and then upload it back.
any help would be appreciated

Offline

 

#16 2010-11-01 22:02:13

lasc12
Scratcher
Registered: 2007-11-18
Posts: 100+

Re: Help with scoring and lives

shera wrote:

the issue with it is
1. it doesn't keep score. sometimes the score will jump to 40 while other times it doesn't go up
2. the life won't go down when hit.

the point of the game is to feed homer without feeding him his family.

I'll delete the game and just censore it and then upload it back.
any help would be appreciated

I was about to look again but you deleted it. Tell me when you re-upload.


Thus I have spoken.

Offline

 

#17 2010-11-02 01:26:25

shera
New Scratcher
Registered: 2010-10-29
Posts: 16

Re: Help with scoring and lives

http://scratch.mit.edu/projects/shera/1389668
here u go

Offline

 

#18 2010-11-02 18:25:19

lasc12
Scratcher
Registered: 2007-11-18
Posts: 100+

Re: Help with scoring and lives

Click here. This ought to do it. There's still alcohol, though. It's in the instructions, when it talks about drinking and in the images you see when you win. If it didn't work, pray tell. Please give credit if it does.


Thus I have spoken.

Offline

 

#19 2010-11-03 11:00:40

Winkysquirt
Scratcher
Registered: 2010-07-30
Posts: 4

Re: Help with scoring and lives

put set lives or score to zero. say red is where you lose a life. then put if touching collor red change lives or score by -1 or if its score by1. then put wait until touching color red if thats the thing that you lose a live with or green if thats the thing that makes the score go  up.

look at my project Quidditch r the score except that goes u by ten and you can always change it

b winkysquirt  big_smile

Offline

 

#20 2010-11-03 11:09:14

Winkysquirt
Scratcher
Registered: 2010-07-30
Posts: 4

Re: Help with scoring and lives

when i said say red is where you lose a life i didnt me put that as a script

Offline

 

#21 2010-11-03 17:54:10

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

Re: Help with scoring and lives

Thanxs 4 the help

Offline

 

Board footer