ID:2170092
 
(See the best response by Edit Nero.)
Code:
        A()  //Strike One LEFT HANDED
set hidden = 1
//spawn() Stun(20) //was overwritten temporarily to test my Stun proc, might need to use it in the future --Dipic
//return
if(src.Attacking||src.act_disabled||usr.ko)
return
if(src.OnCD)
return
if(usr.nonpk)
usr.report("You're unable to attack in a Non-PK Zone!")
return
src.Attacking=1
if(src.target)
src.dir=get_dir(src,src.target) //If the user hasn't used a combo skill
if(!src.Wielding)
flick("lightpunchL",src)

else
if(src.EquipType=="Lightsword")
var/state=pick("lcombo1","lcombo2")
flick("[state]",src)
src.Attacking=0
src.CombatStateProc()
src.OnCD=1
var/cd=src.BaseAttackCD-(src.Agility/20)
if(cd<=2.5)
cd=2.5
spawn(cd)
src.OnCD=0
var/cd2=cd/10
usr.report("You are now on cooldown for [cd2] seconds")
src.PreviousKey=addtext(src.PreviousKey,"A")
usr.<<"[src.PreviousKey]"
src.ComboCheck()


Problem description:
I use Pixel Movement so I was wondering is there a better substitution for get_step since there is a bound box and I use Pixel Movement.


Best response
I use:

get_bounds(mob/M, boundz_x = 0, boundz_y = 0)
if(M.dir == EAST) boundz_x = M.bound_width
else if(M.dir == WEST) boundz_x = -M.bound_width
else if(M.dir == NORTH) boundz_y = M.bound_height
else if(M.dir == SOUTH) boundz_y = -M.bound_height
return obounds(M, boundz_x, boundz_y)


but theres a better way I'm certain, I think Kaiochao had a better function.