ID:2175186
 
(See the best response by Lummox JR.)
Code:
    var/tmp/mob/M
var/tmp/AttDir = usr.dir
var/tmp/MDir
for(M in orange(1))
MDir = get_dir(usr,M)
if(MDir == AttDir)
usr << "You hit [M.name]!"


Problem description:
The above code as simple as it is makes almost a perfect connection to hitting a mob if there was such thing as orange(0.7) I would have it made. Any ideas on cutting the range just a little shorter anyone? The example below will show the enemy being just out of the sword reach.



not possible without using pixel movement or an object with pixel bounds
Best response
What you really want is obounds() with an offset.
obounds() is perfect! thanks again everyone for responding!