Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need Help.
- Fused_Foxy_360
-
Scratcher
15 posts
I need Help.
I am making a game and i need help with it. I did this code and it wont change the costume it might be the <Costume name> = <Fully_Grown_Carrots>
. I changed it again and again and i do not know how to fix it. so here is the code:
(You will be credited in the game if your comment fixed it!)
. I changed it again and again and i do not know how to fix it. so here is the code:
when green flag clicked
forever
if <[costume name] = [Fully_Grown_Carrots]> then
forever
if <mouse down?> then
add [Carrot] to [Inventory]
switch costume to [Carrots Growing]
end
(You will be credited in the game if your comment fixed it!)
Last edited by Fused_Foxy_360 (Aug. 23, 2026 14:45:22)
- 1234not123abc
-
Scratcher
100+ posts
I need Help.
is the problem when the carrots are fully grown you cannot stop collecting?
- bord_game12
-
Scratcher
9 posts
I need Help.
ok what is the problem? and can l see the game to help you?
- grkw2020
-
Scratcher
500+ posts
I need Help.
Could you share the project? It's not clear exactly how the script works without seeing the other scripts at play.
- joe1718
-
Scratcher
83 posts
I need Help.
I am making a game and i need help with it. I did this code and it does not work. I changed it again and again and i do not know how to fix it. so here is the code:Pleas share the project.when green flag clickedforever
if <[costume name] = [Fully_Grown_Carrots]> then
forever
if <mouse down?> then
add [Carrot] to [Inventory]
switch costume to [Carrots Growing]
end
- Fused_Foxy_360
-
Scratcher
15 posts
I need Help.
Sorry I took too long to respond here is the link:
https://scratch.mit.edu/projects/1370282914/
Called: Farm Life | 1.0 |
https://scratch.mit.edu/projects/1370282914/
Called: Farm Life | 1.0 |
- Fused_Foxy_360
-
Scratcher
15 posts
I need Help.
is the problem when the carrots are fully grown you cannot stop collecting?no it isn't that. I just found out an solution for that.

Last edited by Fused_Foxy_360 (Aug. 23, 2026 14:43:35)
- grkw2020
-
Scratcher
500+ posts
I need Help.
Well what is the problem?is the problem when the carrots are fully grown you cannot stop collecting?no it isn't that. I just found out an solution for that.
- Lilyheart5Warriors
-
Scratcher
9 posts
I need Help.
Try removing the second forever block! It should still work if it's like this.
when green flag clicked
forever
if <(costume [name v])=(Fully_Grown_Carrots)> then
if <mouse down?> then
add [Carrot] to [Inventory v]
switch costume to [Carrots Growing v]
end
end
end
- Fused_Foxy_360
-
Scratcher
15 posts
I need Help.
Try removing the second forever block! It should still work if it's like this.I just did that. Even changed it a little and still did not work.when green flag clickedforever
if <(costume [name v])=(Fully_Grown_Carrots)> then
if <mouse down?> then
add [Carrot] to [Inventory v]
switch costume to [Carrots Growing v]
end
end
end
- Lilyheart5Warriors
-
Scratcher
9 posts
I need Help.
I'll have a look at the project.
Edit: I think I figured it out!
Original code:
New code, which I tested and it worked:
Edit: I think I figured it out!
Original code:
when I receive [ALL ITEMS SHOW v]
switch costume to (Carrots Growing v)
forever
wait (60) seconds
switch costume to (Fully_Grown_Carrots v)
if <(costume [name v]) = (Fully_Grown_Carrots)> then
if <mouse down?> then
add (Carrot) to [Inventory v]
end
end
end
New code, which I tested and it worked:
when I receive [ALL ITEMS SHOW v]
broadcast [Carrots, grow! v]
when I receive [Carrots, grow! v]
set (Carrots grown? v) to [n]
switch costume to (Carrots Growing v)
wait (60) seconds
set (Carrots grown? v) to [y]
switch costume to (Fully_Grown_Carrots v)
repeat until <(Carrots grown?) = [n]>
if <mouse down?> then
add [Carrot] to [Inventory v]
set (Carrots grown? v) to [n]
broadcast [Carrots, grow! v]
end
end
Last edited by Lilyheart5Warriors (Aug. 27, 2026 12:15:49)
- Fused_Foxy_360
-
Scratcher
15 posts
I need Help.
I'll have a look at the project.THANK YOU SO MUCH! I will credit you in the notes in credits spot.
Edit: I think I figured it out!
Original code:when I receive [ALL ITEMS SHOW v]
switch costume to (Carrots Growing v)
forever
wait (60) seconds
switch costume to (Fully_Grown_Carrots v)
if <(costume [name v]) = (Fully_Grown_Carrots)> then
if <mouse down?> then
add (Carrot) to [Inventory v]
end
end
end
New code, which I tested and it worked:when I receive [ALL ITEMS SHOW v]
broadcast [Carrots, grow! v]
when I receive [Carrots, grow! v]
set (Carrots grown? v) to [n]
switch costume to (Carrots Growing v)
wait (60) seconds
set (Carrots grown? v) to [y]
switch costume to (Fully_Grown_Carrots v)
repeat until <(Carrots grown?) = [n]>
if <mouse down?> then
add [Carrot] to [Inventory v]
set (Carrots grown? v) to [n]
broadcast [Carrots, grow! v]
end
end

- Discussion Forums
- » Help with Scripts
-
» I need Help.