This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-01-17 19:23:03

metaknight2
Scratcher
Registered: 2008-05-26
Posts: 8

How do I calculate the height of an object?

I am trying to make a point-and-click adventure game, and it will use a sprite whose position is defined by -180 plus half the width of the current costume. How do I do this?

I ask because it's really easy to do in Java.

Last edited by metaknight2 (2012-01-17 19:28:50)

Offline

 

#2 2012-01-17 19:42:45

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: How do I calculate the height of an object?

Use <y position>

Offline

 

#3 2012-01-17 19:44:50

metaknight2
Scratcher
Registered: 2008-05-26
Posts: 8

Re: How do I calculate the height of an object?

That's not a solution in any way. The Y position of an object is the center of the object, and I want to position my objects based on the bottoms of the object.

EDIT: I can do it by moving the costume centers

Last edited by metaknight2 (2012-01-17 19:45:28)

Offline

 

Board footer