mob
proc
t_missile(mob/M,obj/O,distance,power,delay,Homing,mob/H,duration)
if(Homing&&H)
while(distance>0&&O&&M&&H)
var/mob/target
O.dir=get_dir(O,H)
if(M.targeted==0)
for(var/mob/A in get_step(O,O.dir))
if(A&&A!=M&&ismob(A))
target=A
step_towards(O,H)
sleep(delay)
distance--
if(target) return target
else
for(M.targeted in oview(7))
target=M.targeted
step_towards(O,M.targeted)
sleep(delay)
distance--
if(target) return target
if(M&&O&&H)
return 1
else if(!H&&M&&O)
Homing=0
t_missile(M,O,distance,power,0,0,0,0,0)
else
while(distance>0&&O&&M)
var/mob/target
for(var/mob/A in get_step(O,O.dir))
if(A&&A!=M&&ismob(A))
target=A
step(O,O.dir)
sleep(delay)
distance--
if(target) return target
if(M&&O)
return 1
mob
verb
SpecialBeamCannon()
set name="SBC"
set category="Fighting"
if(delay)
return
if(usr.stamina>9)
if(usr.maxki>=600)
spawn(25)
usr.stamina-=rand(5,9)
usr.ki-=606
var/obj/specialbeamcannonhead/SBC=new(src.loc)
SBC.dir=src.dir
var/dmg=10
var/mob/M=t_missile(src,SBC,8,6,2,0,45,0,0,0)
if(M==1)
del(SBC)
sleep(delay)
else if(M)
world<<"[src.name] hit [M.name] for [dmg]!"
del(SBC)
else
usr<<"You need a maxki of 600 or more to perform this move."
else
return
obj
specialbeamcannontail
icon='Special Beam.dmi'
icon_state="SB_Tail"
layer = MOB_LAYER + 99
density=1
obj
specialbeamcannonhead
icon='Special Beam.dmi'
icon_state="SB_Head"
layer = MOB_LAYER + 99
density=0
var/delay
delay=30
distance=8
I am stuck i want to create a procedure that fires my beams head and tail, but i don't know how to even approach it.How can i modify this code to do so?