Discuss Scratch

Sstar-1
Scratcher
55 posts

My health in my game is not working! Please help!

The health in my game is not working here is the code
when green flag clicked
forever
if <<touching [Nerf v] ?> and <([costume name v] of [Nerf v]) = [Dart]>> then
change [Health v] by (-5)
end
if <<touching [Paint Ball v] ?> and <([costume name v] of [Paint Ball v]) = [Paintball]>> then
change [Health v] by (-2)
end
if <touching [Doge Ball v] ?> then
change [Health v] by (-1)
end
end
the Doge Ball is the only one that works do you know why?

Last edited by Sstar-1 (Jan. 29, 2025 15:54:05)

Sstar-1
Scratcher
55 posts

My health in my game is not working! Please help!

Sstar-1 wrote:

The health in my game is not working here is the code
when green flag clicked
forever
if <<touching [Nerf v] ?> and <([costume name v] of [Nerf v]) = [Dart]>> then
change [Health v] by (-5)
end
if <<touching [Paint Ball v] ?> and <([costume name v] of [Paint Ball v]) = [Paintball]>> then
change [Health v] by (-2)
end
if <touching [Doge Ball v] ?> then
change [Health v] by (-1)
end
end
the Doge Ball is the only one that works do you know why?
Here is my game the code is in Player
https://scratch.mit.edu/projects/1125362841
minniesworld
Scratcher
500+ posts

My health in my game is not working! Please help!

Can you please share the project so we can see it?
Sstar-1
Scratcher
55 posts

My health in my game is not working! Please help!

minniesworld wrote:

Can you please share the project so we can see it?
Try now
Sstar-1
Scratcher
55 posts

My health in my game is not working! Please help!

any idea on how to fix?

Powered by DjangoBB