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

/ ||||||||||||| \ ____._____/ Wahsp \ ________._/ ||||||||||||| \
/ |||||||||||||||||||||| \_____ / Game Maker \______/ ||||||||||||||||||||| \
| |||||||||||||||||||||||| |___–_| 2,500 + Posts |___._| |||||||||||||||||||||||| |
/ |||||||||||||||||||||||||| \ ____/ Forum Helper \___._/ |||||||||||||||||||||||||| \
| ||||||||||||||||||||||||||| |____| Past FPC #288|____| ||||||||||||||||||||||||||| |
-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.

Before you post in the Suggestions forum, please remember to check out the List of Rejected Suggestions. Thanks!

Powered by DjangoBB

Standard | Mobile