Discuss Scratch

NardNard11
Scratcher
21 posts

Why can't I change score?

I made a game but whenever the ball touches the stick the score would not change.Did I do something wrong or is there a glitch?Please see inside
————————–>Your text to link here…

Thanks

Last edited by NardNard11 (Nov. 28, 2016 07:45:14)

awesome-llama
Scratcher
1000+ posts

Why can't I change score?

Put the point increasing scripts inside the ball sprite instead(merged with the bouncing off the paddle script):
when green flag clicked
forever
if <touching [sprite2 v] ?> then
turn cw (pick random (160) to (200)) degrees
change [Your score v] by (1)
wait (1) secs
end
end
ALSO, your cloud data script in sprite1 is supposed to look like this:
when green flag clicked
forever
if <(☁ Global High Score) > (your score)> then
set [☁ Global High Score v] to (your score)
end
end

Last edited by awesome-llama (Nov. 29, 2016 07:28:03)



NardNard11
Scratcher
21 posts

Why can't I change score?

Ok. Thanks

Last edited by NardNard11 (Nov. 28, 2016 07:53:53)

awesome-llama
Scratcher
1000+ posts

Why can't I change score?

NardNard11 wrote:

ok.
Fixed my above post.


NardNard11
Scratcher
21 posts

Why can't I change score?

Thanks it worked!
NardNard11
Scratcher
21 posts

Why can't I change score?

Thanks for helping me get the score right but I think the second cloud data script you put is wrong.







Last edited by NardNard11 (Nov. 29, 2016 00:43:11)

awesome-llama
Scratcher
1000+ posts

Why can't I change score?

NardNard11 wrote:

Thanks for helping me get the score right but I think the second cloud data script you put is wrong.

Oh… you're right. The boolean should have the symbol flipped around to a “>”.


Powered by DjangoBB