mob
icon = 'mob.dmi'
// My new favorite method of defining bounds
// and why I've needed so much to fix this
bounds = "9,9 to 24,24"
atom/movable
New()
pwidth = bound_width
pheight = bound_height
// Forces the object to appear at the
// bottom-left of the tile, which may not
// be too horrible. You could probably
// set step_x/y in New() too.
pixel_x -= bound_x
pixel_y -= bound_y
// Most important part
bound_x = 0
bound_y = 0
..()
ID:768895
May 24 2012, 12:00 pm
|
|
All that's needed to allow use of bound_x/y (because right now it messes up collisions) is this:
|
May 24 2012, 12:45 pm
|
|
Thanks, I'll make that change for the next update which will probably be soon - the action RPG framework is resulting in a lot of changes to libraries. Pixel Movement and Overlays will be getting updates soon (probably today or tomorrow).
|
Sorry about bringing this up right after an update, but you mixed up pwidth/height and bound_width/height in atom/movable/New().
|
If you set the pwidth and not the bound_width, I wouldn't want it to overwrite your pwidth value with the bound_width value (edit: I'm assuming that most people will set pwidth and not bound_width). Is there a way to sort out which values you have or haven't specified?
|
My guess is whichever isn't the default icon size would be the changed one. If both are changed, you could just make another PixelMovement preference for which to use.
|
pwidth and pheight default to -1 so I can check if you've changed that, but you'll probably run into cases where both have changed:
mob I'll probably just make it only use bound_width/height if pwidth and pheight are -1, which should cover all cases as long as you're not mixing pwidth and bounds like that. |