ID:1618820
 
Keywords: help, proc
(See the best response by GhostAnime.)
Problem description:
So what i'm trying to do is i called a proc and i dont want the program to wait until the proc is finished is there a way to do that?
    SmallAttack()
if(target_mob)
dir=get_dir(src,target_mob)
for(var/mob/M in get_step(src,dir))
if(attacking)
return
attacking=1
flick(pick("Attack","Attack2"),src)
Dash_Effect(loc)
var/chance=rand(0,1)
if(chance)
var/direc=rand(0,1)
if(direc)
loc=locate(M.x-pick(-1,1),M.y,M.z)
else
loc=locate(M.x,M.y-pick(-1,1),M.z)
dir=get_dir(src,M)
world << "[dir]"
spawn(5)
attacking=0
M.Target_Atom(src)
Target_Atom(M)

Thing is when i call the M targeting system i have to wait awhile before my targeting system activates.
Best response
spawn() the target system.

If that target atom proc does take a few seconds to complete, it may be a good idea to take a look at it again and see if you can make it more efficient.
In response to GhostAnime
Thank you so much that fixed it :D!