Discuss Scratch

Parametric
New to Scratch
40 posts

Height/Length of "costume"

I know you can technically do this by doing each costume individually, but I think this block would make it a lot more convenient when measuring distances. For example, I'm making a game where the wall sensing engine is kind of like this.

(in the platform's scripts)

if <(y position) - ([y position v] of [Player v]) > (([height v] of [Player v]) / (2))> then 
set [bottom sensor v] to [1]
else
set [bottom sensor v] to [0]
end

(that's a simplified version of it anyway)

Basically, the “height of player” block could be a way of accounting for the Player sprite's different costume changes to ensure that it works the same no matter which costume the Player sprite is in.

Again, I know there's a work-around by doing each costume individually (e.g. if ypos - Player_ypos > 24 and Player_costume = 1 OR ypos - Player_ypos > 12 and Player_costume = 2, etc.), or I guess you could make a sprite-exclusive variable for the player & do it that way, but I feel like adding height/length would make it a lot more convenient for these types of engines to run.

Idk, let me know what you guys think

Last edited by Parametric (Dec. 6, 2017 02:19:32)

Charles12310
Scratcher
1000+ posts

Height/Length of "costume"

Support because I really don't want to drag all those blocks in the workaround. It takes up space when you make long booleans. I think that we should have costume height/length for many important reasons.

I think Griffpatch had a way to determining height/length but it's better to just get the height/length right away.


Click This Link For Some Secrets About Me!
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
Wahsp
Scratcher
1000+ posts

Height/Length of "costume"

Charles12310 wrote:

Support because I really don't want to drag all those blocks in the workaround. It takes up space when you make long booleans.
^
Support

Thefrenchpeople wrote:

Read the stickies; they're good for your brain; if you do, we won't go insane
After posting almost 5,000 times on here, I don’t think I have any sanity left to lose (:
-ShadowOfTheFuture-
Scratcher
1000+ posts

Height/Length of "costume"

Support! It would be very useful to be able to directly know the costume's height and length.

Isn't it so fun to click the images in people's signatures?

Powered by DjangoBB

Standard | Mobile