# Set Size not in Percent

### A feature I’d like to see in Hopscotch is: `Set Size in Points`

#### I’ve seen something similar in another programming languages, it looks like this: `well the same but not in percents mostly everywhere I think`

• Yay
• or (tap here if dunno)
• Nay

0 voters

4 Likes

Interesting suggestion. I’m not familiar with how the “Set Points” method works in other languages. Is the unit based on the X and Y grid on the project canvas?

3 Likes

Like you know, imagine the Set Width and Height block but now link these 2 values with each other, so they share the same value

6 Likes

Technically you can do that with variables

5 Likes

Yes, but wouldn’t it be more convenient to have it as one block? At least until we get functions with arguments

5 Likes

Oh, I see what you mean now. Thanks for explaining!

3 Likes

Always welcome

3 Likes

My take is that there should be more flexibility in general with parameters.

Like what about “set x position” or “set y position” separately? Anyways, I think what you have is pretty good but it would have to be implemented differently than “size points”

7 Likes

Understandable

5 Likes

You can set the width and height to the same variable

1 Like

Yes, but adding this block to hopscotch would make it simpler….?
See, percents divide an object to 100 pieces
And therefore, increasing it would do this:
If you increase it while it is smaller, it will increase the size by smaller bits
But, if you increase it while it is bigger, it will increase by bigger bits
I think the addition of this block would eliminate this problem, if it has bothered anyone and yeah ^^

2 Likes

Yeah this has actually been confusing for people before — e.g. if you do this, the object will not keep returning to the same size:

``````Repeat Forever
Grow by 25%
Shrink by 25%
``````

Explanation: This is because the new size is 125% of the original size, after you grow by 25%.
Then when you shrink by 25%, this is 25% of the new size 125%.

125\% - (25\% * 125\%) = 125\% - 31.25\% = 93.75\%

If you wanted it to return to the original size, you’d have to do this:

``````Repeat Forever
Grow by 25%
Shrink by 20%
``````

Explanation: When you grow by 25%, the object’s new size is 125% of the original size.

Then when you shrink by 20%, that is 20% of the new size, 125%. The object’s size is now this:

125\% - (20\% * 125\%) = 125\% - 25\% = 100\%

I made a project about it, near when I first started Hopscotching (finally found it, though now I think the explanation is not as clear either )

Getting back to the main point, I do think the percentage can be confusing^^

3 Likes

You can? (hiiii)

2 Likes

YESSSS thank you
This is why I wanted to create such a block

1 Like