Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Score Limit?
- jinsukmik
- New to Scratch
3 posts
Score Limit?
https://scratch.mit.edu/projects/148331766/
I am pretty sure I have the commands there, I saw from another post, but maybe I have it in the wrong spot? Can anyone help me and point out what I did wrong?
I am pretty sure I have the commands there, I saw from another post, but maybe I have it in the wrong spot? Can anyone help me and point out what I did wrong?
- Knight_In_Armor
- Scratcher
100+ posts
Score Limit?
Hello, and welcome to Scratch! Your problem is easy to fix. Go into the cat sprite, and change the score code to this:
That should do it! Hope I helped!
when green flag clicked
set [Score v] to [0]
forever
if <not <(Score) = [10]>> then
play sound [meow v]
change [Score v] by (1)
go to [random position v]
end
end
That should do it! Hope I helped!
when green flag clicked
if <(answer) = [Helpful]> then
say [Thanks!] for (2) secs
broadcast [Follow Knight_In_Armor v]
end
- jinsukmik
- New to Scratch
3 posts
Score Limit?
Ok I think I just need to start over lol
Last edited by jinsukmik (March 8, 2017 05:13:18)
- HoofEMP
- Scratcher
100+ posts
Score Limit?
You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need. Ok I think I just need to start over lol
…
Actually, your code could be cleaned up quite a bit. You won't need to start completely over, but you do need major corrections.
In the cat sprite, change your movement scripts to this:
when gf clicked
forever
if <key [right arrow v] pressed?> then
change x by (increment)
wait (0) secs//waits until next frame
end
if <key [left arrow v] pressed?> then
change x by ((-1) * (increment))
wait (0) secs
end
if <key [up arrow v] pressed?> then
change y by (increment)
wait (0) secs
end
if <key [down arrow v] pressed?> then
change y by ((-1) * (increment))
wait (0) secs
end
end
You can set the increment variable to whatever feels right for your movement speed. I'd recommend much lower than 25.
Replace the two score scripts, still in the cat sprite, with this:
when gf clicked
set [Score v] to [0]
forever
wait until <touching [Cheesy-Puffs v]?>//the wait until block is an improvement upon the if block in this context
play sound [meow v]//this should be outside of the following C UNLESS you intend to use different sfx for a winning score
if <(Score) < [10]> then
change [Score v] by (1)
go to [random position v]
else
broadcast [message1 v]
stop [this script v]
You don't need to change the script in the Cheesy-Puffs sprite unless you intend its position change rate to accelerate or decelerate under certain conditions.
In Sprite2, you're using a forever if for no reason again. Use these two scripts instead:
when gf clicked
hide
when I receive [message1 v]
show
There doesn't seem to be any more to that sprite.
Hopefully my response assisted you in your endeavor!
Hmm… maybe I should put that in my sig.
Last edited by HoofEMP (March 8, 2017 06:28:42)
- scratcher21161
- Scratcher
100+ posts
Score Limit?
You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need. Ok I think I just need to start over lol
…
Actually, your code could be cleaned up quite a bit. You won't need to start completely over, but you do need major corrections.
In the cat sprite, change your movement scripts to this:when gf clicked
forever
if <key [right arrow v] pressed?> then
change x by (increment)
wait (0) secs//waits until next frame
end
if <key [left arrow v] pressed?> then
change x by ((-1) * (increment))
wait (0) secs
end
if <key [up arrow v] pressed?> then
change y by (increment)
wait (0) secs
end
if <key [down arrow v] pressed?> then
change y by ((-1) * (increment))
wait (0) secs
end
end
You can set the increment variable to whatever feels right for your movement speed. I'd recommend much lower than 25.
Replace the two score scripts, still in the cat sprite, with this:when gf clicked
set [Score v] to [0]
forever
wait until <touching [Cheesy-Puffs v]?>//the wait until block is an improvement upon the if block in this context
play sound [meow v]//this should be outside of the following C UNLESS you intend to use different sfx for a winning score
if <(Score) < [10]> then
change [Score v] by (1)
go to [random position v]
else
broadcast [message1 v]
stop [this script v]
You don't need to change the script in the Cheesy-Puffs sprite unless you intend its position change rate to accelerate or decelerate under certain conditions.
In Sprite2, you're using a forever if for no reason again. Use these two scripts instead:when gf clicked
hide
when I receive [message1 v]
show
There doesn't seem to be any more to that sprite.
Hopefully my response assisted you in your endeavor!
Hmm… maybe I should put that in my sig.
this works Quite well
- asivi
- Scratcher
1000+ posts
Score Limit?
You are doing this kind in a lot of topics, next times i will report you as an spammer so please stop doing such thing. Thanks.You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need. Ok I think I just need to start over lol
…
Actually, your code could be cleaned up quite a bit. You won't need to start completely over, but you do need major corrections.
In the cat sprite, change your movement scripts to this:when gf clicked
forever
if <key [right arrow v] pressed?> then
change x by (increment)
wait (0) secs//waits until next frame
end
if <key [left arrow v] pressed?> then
change x by ((-1) * (increment))
wait (0) secs
end
if <key [up arrow v] pressed?> then
change y by (increment)
wait (0) secs
end
if <key [down arrow v] pressed?> then
change y by ((-1) * (increment))
wait (0) secs
end
end
You can set the increment variable to whatever feels right for your movement speed. I'd recommend much lower than 25.
Replace the two score scripts, still in the cat sprite, with this:when gf clicked
set [Score v] to [0]
forever
wait until <touching [Cheesy-Puffs v]?>//the wait until block is an improvement upon the if block in this context
play sound [meow v]//this should be outside of the following C UNLESS you intend to use different sfx for a winning score
if <(Score) < [10]> then
change [Score v] by (1)
go to [random position v]
else
broadcast [message1 v]
stop [this script v]
You don't need to change the script in the Cheesy-Puffs sprite unless you intend its position change rate to accelerate or decelerate under certain conditions.
In Sprite2, you're using a forever if for no reason again. Use these two scripts instead:when gf clicked
hide
when I receive [message1 v]
show
There doesn't seem to be any more to that sprite.
Hopefully my response assisted you in your endeavor!
Hmm… maybe I should put that in my sig.
this works Quite well
- HoofEMP
- Scratcher
100+ posts
Score Limit?
This kind? Pardon?You are doing this kind in a lot of topics, next times i will report you as an spammer so please stop doing such thing. Thanks.You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need. Ok I think I just need to start over lol
…
Actually, your code could be cleaned up quite a bit. You won't need to start completely over, but you do need major corrections.
In the cat sprite, change your movement scripts to this:when gf clicked
forever
if <key [right arrow v] pressed?> then
change x by (increment)
wait (0) secs//waits until next frame
end
if <key [left arrow v] pressed?> then
change x by ((-1) * (increment))
wait (0) secs
end
if <key [up arrow v] pressed?> then
change y by (increment)
wait (0) secs
end
if <key [down arrow v] pressed?> then
change y by ((-1) * (increment))
wait (0) secs
end
end
You can set the increment variable to whatever feels right for your movement speed. I'd recommend much lower than 25.
Replace the two score scripts, still in the cat sprite, with this:when gf clicked
set [Score v] to [0]
forever
wait until <touching [Cheesy-Puffs v]?>//the wait until block is an improvement upon the if block in this context
play sound [meow v]//this should be outside of the following C UNLESS you intend to use different sfx for a winning score
if <(Score) < [10]> then
change [Score v] by (1)
go to [random position v]
else
broadcast [message1 v]
stop [this script v]
You don't need to change the script in the Cheesy-Puffs sprite unless you intend its position change rate to accelerate or decelerate under certain conditions.
In Sprite2, you're using a forever if for no reason again. Use these two scripts instead:when gf clicked
hide
when I receive [message1 v]
show
There doesn't seem to be any more to that sprite.
Hopefully my response assisted you in your endeavor!
Hmm… maybe I should put that in my sig.
this works Quite well
- asivi
- Scratcher
1000+ posts
Score Limit?
this works Quite wellYou are doing this kind in a lot of topics, next times i will report you as an spammer so please stop doing such thing. Thanks.
This kind? Pardon?
Sorry, maybe sort of responses?
Greets.
- HoofEMP
- Scratcher
100+ posts
Score Limit?
I don't believe I should be reported for posting working solutions to problems. If some of the solutions I post are similar, then chances are the problems are similar. If you were referring to scratcher21161, though, then there also really isn't any reason to report someone for thanking another.this works Quite well
You are doing this kind in a lot of topics, next times i will report you as an spammer so please stop doing such thing. Thanks.This kind? Pardon?
Sorry, maybe sort of responses?
Greets.
Last edited by HoofEMP (March 13, 2017 00:31:04)
- asivi
- Scratcher
1000+ posts
Score Limit?
https://scratch.mit.edu/discuss/post/2498050/
I think there is not needed to link the other bunch about i was talking about.
I think there is not needed to link the other bunch about i was talking about.
- deck26
- Scratcher
1000+ posts
Score Limit?
@asivi wasn't referring to your post. @scratcher21161 has been posting a lot recently with quite a lot just being repeats of an earlier response in the thread or something which doesn't really add anything to the discussion.I don't believe I should be reported for posting working solutions to problems. If some of the solutions I post are similar, then chances are the problems are similar. If you were referring to scratcher21161, though, then there also really isn't any reason to report someone for thanking another.this works Quite well
You are doing this kind in a lot of topics, next times i will report you as an spammer so please stop doing such thing. Thanks.This kind? Pardon?
Sorry, maybe sort of responses?
Greets.
Oh, and @asivi's first language isn't English. Given my general inability to speak other languages I'm not going to be too critical of someone helping here in another language.
Last edited by deck26 (March 13, 2017 10:09:49)
- asivi
- Scratcher
1000+ posts
Score Limit?
Thanks to al scratchers and ST members for your patience sorry for inconveniences to anyone.
Regards.
Regards.
- HoofEMP
- Scratcher
100+ posts
Score Limit?
Thanks for the clear explanation.@asivi wasn't referring to your post. @scratcher21161 has been posting a lot recently with quite a lot just being repeats of an earlier response in the thread or something which doesn't really add anything to the discussion.I don't believe I should be reported for posting working solutions to problems. If some of the solutions I post are similar, then chances are the problems are similar. If you were referring to scratcher21161, though, then there also really isn't any reason to report someone for thanking another. snippity snoppity snoop
Oh, and @asivi's first language isn't English. Given my general inability to speak other languages I'm not going to be too critical of someone helping here in another language.
Last edited by HoofEMP (March 14, 2017 04:39:12)
- rainbatman8
- Scratcher
1 post
Score Limit?
make a score variable
USE THIS CODE TO HAVE A SCORE LIMIT!
USE THIS CODE TO HAVE A SCORE LIMIT!
when green flag clicked
forever
if <[score] = [15]> then
stop [all]
Last edited by rainbatman8 (Sept. 20, 2021 00:33:34)
- vudeptrai090211
- Scratcher
1000+ posts
Score Limit?
wrong make a score variable
USE THIS CODE TO HAVE A SCORE LIMIT!when green flag clicked
forever
if <[score] = [15]> then
stop [all]
Don't think this is a part of my posts, this is my signature. You can see how to change/add a signature here.
Highlight + ctrl (cmd) + shift + down to see my full signature
I don't work very much on forums anymore. Now, I love making projects!
Links:
ACCOUNTS: Alt Test Animate
PROJECTS: Space Dodger Tiny Ball's Adventure Epic Catch Game Potion Clicker
STUDIOS: Fanbase
congrats! you've reached the end of this signature!
win this challenge to have a wish!
- vudeptrai090211
- Scratcher
1000+ posts
Score Limit?
why? Please don't respond to topics that are so old.
Don't think this is a part of my posts, this is my signature. You can see how to change/add a signature here.
Highlight + ctrl (cmd) + shift + down to see my full signature
I don't work very much on forums anymore. Now, I love making projects!
Links:
ACCOUNTS: Alt Test Animate
PROJECTS: Space Dodger Tiny Ball's Adventure Epic Catch Game Potion Clicker
STUDIOS: Fanbase
congrats! you've reached the end of this signature!
win this challenge to have a wish!
- deck26
- Scratcher
1000+ posts
Score Limit?
Because all it does it pointlessly bring an old post to the top of the forum knocking someone who actually needs help currrently off the top page. It's about showing consideration towards others.why? Please don't respond to topics that are so old.
- Discussion Forums
- » Help with Scripts
- » Score Limit?