mob
proc
Dash_Effect(location)
var/obj/d1 = new()
d1.name = "[src] Dash Mode"
d1.icon = src.icon
d1.overlays = src.overlays
d1.dir = src.dir
d1.loc = location
d1.icon -= rgb(120,120,120,160)
spawn(5) del(d1)
mob
verb
Dash()
set hidden = 1
usr.dashing = 1
step(usr,usr.dir)
usr.Dash_Effect(usr.loc)
sleep(1)
usr.Dash_Effect(usr.loc)
step(usr,usr.dir)
sleep(1)
usr.Dash_Effect(usr.loc)
step(usr,usr.dir)
sleep(1)
usr.Dash_Effect(usr.loc)
step(usr,usr.dir)
sleep(1)
usr.Dash_Effect(usr.loc)
step(usr,usr.dir)
sleep(1)
usr.Dash_Effect(usr.loc)
step(usr,usr.dir)
sleep(1)
usr.Dash_Effect(usr.loc)
step(usr,usr.dir)
usr.dashing = 0
Problem description:
When I or someone dash, game become laggy while dashing.
You'd be better off making an icon state that is the color you want, or using an overlays with alpha levels while they're dashing to give the effect.