Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help with this inventory script.
- Fish-Sticks96
-
4 posts
I need help with this inventory script.
Here is a link to the unshared project. You can either remix it or post a comment on how to fix it.
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137654254/
I'm having trouble with the change x by () block. The first clone will stay put, the second clone will move, but all the other ones stay put, when they should be moving.
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137654254/
when I start as a clone
show
switch costume to (Items)
if <(Inventory :: Inventory) > [1]>
change x by (60)
end
forever
if <touching [mousepointer v] ?> then
change size by (((120) - ((size))) / (4))
else
change size by (((100) - ((size))) / (4))
end
end
I'm having trouble with the change x by () block. The first clone will stay put, the second clone will move, but all the other ones stay put, when they should be moving.
Last edited by Fish-Sticks96 (Feb. 22, 2025 18:11:52)
- KaaBEL_sk
-
100+ posts
I need help with this inventory script.
Your project is unshared, if we are meant to see what's causing the problem or comment to it you must share it first.
- mkb13212
-
4 posts
I need help with this inventory script.
You sadly can control all clones to do something, instead of making them do separate things, so maybe that's the problem? Here is a link to the unshared project. You can either remix it or post a comment on how to fix it.
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137654254/when I start as a clone
show
switch costume to (Items)
if <(Inventory :: Inventory) > [1]>
change x by (60)
end
forever
if <touching [mousepointer v] ?> then
change size by (((120) - ((size))) / (4))
else
change size by (((100) - ((size))) / (4))
end
end
I'm having trouble with the change x by () block. The first clone will stay put, the second clone will move, but all the other ones stay put, when they should be moving.
- Fish-Sticks96
-
4 posts
I need help with this inventory script.
Your project is unshared, if we are meant to see what's causing the problem or comment to it you must share it first.
Just shared the project.
- bsteichman
-
500+ posts
I need help with this inventory script.
your problem is probably that you're using a broadcast. Broadcasts will run that code on every single clone of the sprite as well. So when you run the broadcast, every clone makes a clone of itself.
- Discussion Forums
- » Help with Scripts
-
» I need help with this inventory script.