ID:852411
 
(See the best response by Kaiochao.)
Question One: So, I get it that width/height of the the object determine the box that he is in. Does that mean bound_x and bound_y are the distances that other mobs can go in?


Question Two: Can you demonstrate how to calculate an object's bound_width, bound_height, bound_y and bound_x?

Question Three: Since my object losses width on side ways, should I change its bound the moment it's spawned as it is facing East, more height less width? Cheers.
Best response
Say you have a 16x16 square centered in a 32x32 icon. Initially, the bounds are "1,1 to 32,32", or bound_x/y=0 and bound_width/height=32.


If you set bound_width/height to 16, now the bounds are "1,1 to 16,16". The top-right corner of the bounding box is at (16,16), the center, and the bottom-left is at (1,1), the bottom-left (surprise!). But the icon's bottom-left is at (9,9)!


This is what bound_x/y is for. If you set bound_x/y=8, it shifts the bounding box 8 pixels up and to the right, which makes the bounds "9,9 to 24,24", which is exactly on the icon.


1. bound_x/y determines where the bottom-left of the bounding box is
2. bound_width/height is the width and height of your bounding box, regardless of where it is
3. changing bound_width/height is changing where the top-right of the bounding box is, relative to the bottom-left (bound_x/y)

When a pixel-mover moves, the only thing that changes is its step_x/y.