Melee Script

This one had me running in circles for days. A note about game maker.
You apparently cannot use with(obj) and then try to pass an object from
outside the with(obj) block of code. Any attempt to reference any of the
outside object's variables will crash the game.

The invincibility timer is also triggered by a script,
player_damage(obj) where you simply pass in the object damaging the
player, no with(player) code needed.

The Melee script needs 3 arguments, but can be reusable. First it takes
the argument of whatever is meleeing the player, then it takes the
distance of the melee, and then it takes the direction the melee takes
place. The direction variable is so we call the function whenever the
player enters range, but it is unknown where he is, so the Melee script
will search for him and melee if the player is in the specified
direction.

NOTE: There is a little gap between where the calling range is, and
where the actual melee range is. It is intentional for testing, but the
gap can be closed by adding or subtracting the appropriate sprite height
or width.