Discuss Scratch

Scratchuser25
Scratcher
3 posts

How do you make the points lower once at a time?

I can't make the points for the game I'm making lower only once if it touches. Can anyone help?
BelleRae99
Scratcher
40 posts

How do you make the points lower once at a time?

If you could be a little more specific, I might get a better idea what you're going for. Otherwise, see it you can apply this.
Set your points system to a variable, most likely called “points”:
(points)
Then, every time the enemy touches your character, set “points” to decrease by 1.
It might look something like this:
when green flag clicked
forever

if <touching [ enemy ] ?> then

change [ points ] by (-1)
end

end

Make sure the above bit of code is placed inside the sprite of the character you wish to lose points.

Last edited by BelleRae99 (Nov. 10, 2015 01:16:23)

Scratcher1002
Scratcher
1000+ posts

How do you make the points lower once at a time?

BelleRae99 wrote:

If you could be a little more specific, I might get a better idea what you're going for. Otherwise, see it you can apply this.
Set your points system to a variable, most likely called “points”:
(points)
Then, every time the enemy touches your character, set “points” to decrease by 1.
It might look something like this:
when green flag clicked
forever

if <touching [ enemy ] ?> then

change [ points ] by (-1)
end

end

Make sure the above bit of code is placed inside the sprite of the character you wish to lose points.
Also put a wait block or it will decrease a lot.
Hypee11
Scratcher
14 posts

How do you make the points lower once at a time?

Thanks!
It helped a lot!
AidenH08
Scratcher
12 posts

How do you make the points lower once at a time?

when green flag clicked
if <touching [whatever it touches v] ?> then
change [points v] by (-1)
end

Last edited by AidenH08 (Jan. 6, 2020 23:51:41)

gor-dee
Scratcher
1000+ posts

How do you make the points lower once at a time?

maybe this…
forever
wait until <touching [ v] ?>
change [ v] by (-1)
wait until <not <touching [ v] ?>>
end
SCRRamiLI6551
Scratcher
14 posts

How do you make the points lower once at a time?

It does not work for me
deck26
Scratcher
1000+ posts

How do you make the points lower once at a time?

SCRRamiLI6551 wrote:

It does not work for me
If you have a problem please create a new topic. This is old and best left alone.
SCRRamiLI6551
Scratcher
14 posts

How do you make the points lower once at a time?

Okay
joshuaho
Scratcher
1000+ posts

How do you make the points lower once at a time?

deck26 wrote:

SCRRamiLI6551 wrote:

It does not work for me
If you have a problem please create a new topic. This is old and best left alone.
This is correct.

You are likely to get more help by creating a new topic compared to posting on an old one. I would also suggest sharing your project to make it easier for others to see what exactly needs to be fixed.

Powered by DjangoBB