mob/verb
StraightAttack()
var/obj/Attack/A=new(src.loc)
A.dir=src.dir
var/dmg=usr.str-m.def
var/mob/M=Projectile(src,A,5,dmg,2,0,0,0,0,0)
if(M==1)
//You could show stop animation here, this means that it ran out of distance.
del(A)
else if(M)//If hit
world<<"[src.name] hit [M.name] for [dmg]!"//Set damage procs here.
del(A)
RadiousAttack()
var/obj/Attack/A=new(src.loc)
A.dir=src.dir
var/dmg=usr.str-m.def
var/M=Projectile(src,A,0,dmg,0,0,1,0,1,1)
if(M)
for(var/mob/B in M)
world<<"[src.name] hit [B.name] for [dmg]!"
del(A)
HomingAttack()
var/list/L=list()
for(var/mob/M in oview(6,src))
L+=M
var/mob/H=input(src,"Who?") in L//If homing, who to hit? XD
var/obj/Attack/A=new(src.loc)
A.dir=src.dir
var/dmg=usr.str-m.def
var/mob/M=Projectile(src,A,5,dmg,2,1,0,H,0,0)
if(M==1)
del(A)
else if(M)
world<<"[src.name] hit [M.name] for [dmg]!"
del(A)
mob
proc
deathcheck()
if(src.Hp <= 0)
view() << "[src] dies!"
src.Hp = src.Mhp
src.Move(locate(1,1,1))
Problem description:
Ok,so my i am trying to make it so that when the projectiles hit the other enimey , they actually get hurt and when they have no hp left they die. but i dont know how to set damage calculations on the projectiles .. i tried usr.str-m.def but it doesnt work any help will be appreciated