I'm using the size block for a program to determine the distance to something, but it won't change it's size. It's supposed to set it's size to half the distance to the mouse, but whenever I run the script it just stays at 100, making it mess up. I've tried a ton of stuff: Having it set to a variable that is set to the distance needed, setting it with the distance block, having a seperate script that sets it to that distance constantly, but nothing has worked.
I can post then project, but I don't think I need to. Anyone know what is happening?
Offline
I had the same problem. Turned out my sprite's costume was too small to be shrunk further even from 100%. I made the costume bigger, shrunk it down, and then it worked fine.
Offline
But I can change this other times, like with the change size block but the set size block is not working.
Offline
It is the same problem I had. I tested it by making a new variable and setting it to the same formula you are figuring size with, (distance to mouse pointer / 2)
That formula generates a value from 0 to 100 so it is trying to shrink the sprite. The sprite is long but very narrow. Scratch will not shrink it because it would shrink in all directions and therefore would disappear because of its narrow width.
My quick fix was to add a (set size to 200%) at the top of the script. But since I don't know what all is going on in your project, I have no idea if that will help.
To solve my problem project, I redrew my sprite and made the narrow part wider.
What a coincidence that we had the same problem almost simultaneously! If you want to see the incomplete but working project I was talking about, check it out here..Space Gunner
(The sprites I had problems with were the laser blasts) Peace!
Offline