Comparing screen_loc in Developer Help
|
|
Is there a way to do this? I'm trying to find out a good way to drag something around. It's really easy to do with a single tile object, but with a multitile object it gets a bit more difficult.
obj TestScreen icon='icon3.dmi' MouseDrag(over_object,src_location,over_location,src_control,over_control,params) world<<"MouseDrag is in effect; the mouse is over [over_object]" if(!over_object:x||!over_object:y) return var/a=((over_object:x)-(usr.x)+6) var/b=((over_object:y)-(usr.y)+6) src.screen_loc="[a],[b]"
|
That's what I did to move a single object. The problem is that if I have a multitile object on the screen and I want to move the rest of the parts of it, I can't think of a good way without comparing the screen_locs. If you can think of a better option than comparing screen_locs, I would appreciate that too.
Edit: I think I'm just going to try to use images instead of worrying about screen_loc.
Edit2: It doesn't look like BYOND is able to handle that, unfortunately.
|