ID:138912
 
Code:
    kiblast
icon='Ki Blasts.dmi'
icon_state="kb5"
density=1
Bump(var/atom/movable/a)
if(istype(a,/mob))//punching bag
..()
Create_Smoke1(a)
del(src)

if(istype(a,/obj/KiTechniques/kiblast))
..()
Create_Smoke1(src)
del (src)
if(istype(a,/obj/KiTechniques/shield))
walk(src,pick(EAST,WEST,NORTHEAST,NORTHWEST,SOUTHEAST,SOUTHWEST),1,1)

else
..()
Create_Smoke1(src)
del (src)

    Ki_Blast()//0.2 damage
set hidden=0
if(usr.Energy>=0.25)

usr.Energy-=0.25
var/h=rand(1,2)
Energy_Drainage()
if(h==1)
flick("lblast",usr)
if(h==2)
flick("rblast",usr)
else
h=2
var/obj/A = new/obj/KiTechniques/kiblast
A.pixel_x += rand(-15,15)
A.pixel_y += rand(-15,15)
// var/color = input("What color?","Color")as color
// A.icon = initial(A.icon) // this is probably what you were trying to do
A.icon += Bcolor
A.loc=locate(src.x,src.y,src.z)
// A.icon_state="kb5"
walk(A,usr.dir,0)
else
usr<<"You lack the energy to do this"
return


Problem description:
If you keep clicking the verb fast enough the ki blast hit each other by bumping into each other making smoke clouds when they hit so im wondering where would I place a delay or something to give each blast enough time to walk without bumpngi each other or a delay on each click of the verb

Id use spawn()

if(src.delay)
return

src.delay = 1
spawn(20) //however long you want the delay to be
src.delay = 0
In response to Slic3y
ok but where do i put that exactly and aren't you supose to make delay a var?
In response to Mastergamerx
If you understood what it does you'd know.

Look for spawn in the reference


In response to Slic3y
i know what spawn does but i mean the whole delay part and isnt it suppose to be defined as a var? and from what im
seeing of spawn it just makes stuff build up as it makes the rest of the code wait
In response to Mastergamerx
..

It basically fits into the top of your verb as it is.
In response to Mastergamerx
Mastergamerx wrote:
i know what spawn does but i mean the whole delay part and isnt it suppose to be defined as a var? and from what im
seeing of spawn it just makes stuff build up as it makes the rest of the code wait

No. Spawn allows the process to continue whilst delaying ONLY the block of code included within it. You're thinking of sleep(), which is NOT the same thing.

You should probably give the guide a look through and then read some proper tutorials before trying to work on a big project.
In response to Mastergamerx
Sorry, I didn't read your last sentence properly.

Luckily Robertbanks cleared that up for you =)