y2k_Bump Bounce

by Y2kEric
A library allowing you to make a /atom/movable get pushed back after bumping another /atom [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Y2kEric.y2k_BumpBounce##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Version 2.1
Date added: Jul 31 2006
Last updated: Jul 29 2009
1 fan
Demo: Included!

_Version Updates_

Version 1 (August 1, 2006) - First release!!
Version 2 (August 1, 2006) - Added var/cur_dir incase the /atom/movable.dir has changed.
Also, fixed a problem where you would bounce back and forth,
Which would cause a runtime error.
Also, I made it so you cannot move will being bounced back.
Version 2.1 (August 1, 2006) - Had to take out the last line in version 2
_Proc Argument Explanation_


var/A - movable atom to be bounced back by the src


var/dir - the direction the atom was facing when bumped into the src
_Proc Return Value Explanation_


Returns 1 if A was bounced back
Return 0 if A was not bounced back


Returns the opposite direction of dir
_Atom Var Explanation_
atom/movable/var/can_get_bounced - if the src is able to be bounced back
atom/movable/var/atom/bounce_activator - /atom that is bounceing back the src
atom/var/can_bounce - determines if the src can bounce a /atom/movable back
atom/var/bounce_dist - the amount of tiles the src will bounce the other /atom/movable back