ID:154991
Oct 18 2011, 7:38 am
|
|
Right now, i've got a large screen obj (160x160) which follows the users mouse pixel location. The only problem is, if the object goes beyond the set boundaries of my map, the map zooms out (basically, increases my world.view) to accomodate it. Is there a way to make it so the obj just disappears as it goes off the screen? or even just making it stop?
|
You can use forum_account's mouse POSITION library and use del() when the mouse if off the map? Not sure if that worked never tried it.
http://www.byond.com/developer/Forum_account/MousePosition |
To just keep it within the bounds of the screen, you would have to parse the screen_loc text string to get the X and Y position, and then use min() and max() to limit them to within the bounds of the screen, and then place the object there instead.