ID:273988
 
On my sidescroller i use get_step() for meelee to hit the person next to you who you are facing. Although get_step() only works for the square next to you and I can't extend its range. So I tried using oview() for an extended range meelee attack but oview() attacks in all directions. How do I make an attack that reaches more than 1 tile away and only in a specified direction?
I suggest looking up block() in the DM Reference. (:
Here's a link: http://www.byond.com/ members/?command=reference&path=proc%2Fblock
<code>get_step()'s</code> range can be extended.

var/turf/turf = get_step(get_step(get_step(src, dir), dir), dir)
In response to Hex6
Both of these are good suggestions but how do I then link it to the mob that I'm targetting inside those?
In response to Zerok Kaiba
Link the mob by looping through mobs in the turf.

for(var/mob/enemy in get_step(get_step(get_step(src, dir), dir), dir))

do something; break


<code>break</code> so it only effects the first mob found.