Discuss Scratch

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?
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:

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?

jinsukmik wrote:

Ok I think I just need to start over lol
You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need.

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?

HoofEMP wrote:

jinsukmik wrote:

Ok I think I just need to start over lol
You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need.

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

You look like you want to see an epic project or 2
Can I reach 1000 followers? Every follow counts!
asivi
Scratcher
1000+ posts

Score Limit?

scratcher21161 wrote:

HoofEMP wrote:

jinsukmik wrote:

Ok I think I just need to start over lol
You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need.

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
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.
HoofEMP
Scratcher
100+ posts

Score Limit?

asivi wrote:

scratcher21161 wrote:

HoofEMP wrote:

jinsukmik wrote:

Ok I think I just need to start over lol
You really don't. However, if I understand your intent correctly, Knight_In_Armor's response is slightly different than what you need.

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
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?


asivi
Scratcher
1000+ posts

Score Limit?

scratcher21161 wrote:

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.

HoofEMP wrote:

This kind? Pardon?

Sorry, maybe sort of responses?
Greets.
HoofEMP
Scratcher
100+ posts

Score Limit?

asivi wrote:

scratcher21161 wrote:

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.

HoofEMP wrote:

This kind? Pardon?

Sorry, maybe sort of responses?
Greets.
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.

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.
deck26
Scratcher
1000+ posts

Score Limit?

HoofEMP wrote:

asivi wrote:

scratcher21161 wrote:

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.

HoofEMP wrote:

This kind? Pardon?

Sorry, maybe sort of responses?
Greets.
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.
@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.

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.
HoofEMP
Scratcher
100+ posts

Score Limit?

deck26 wrote:

HoofEMP wrote:

asivi wrote:

snippity snoppity snoop
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.
@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.

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.
Thanks for the clear explanation.

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!
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?

rainbatman8 wrote:

make a score variable

USE THIS CODE TO HAVE A SCORE LIMIT!
when green flag clicked
forever
if <[score] = [15]> then
stop [all]

wrong

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?

Please don't respond to topics that are so old.
vudeptrai090211
Scratcher
1000+ posts

Score Limit?

deck26 wrote:

Please don't respond to topics that are so old.
why?

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?

vudeptrai090211 wrote:

deck26 wrote:

Please don't respond to topics that are so old.
why?
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.

Powered by DjangoBB