proc
sabre()
if(src.attacking == 0)
var/obj/K = new/obj/wepSabre
flick("sabre",usr)
spawn(3)
src.attacking = 1
K.dir = src.dir
K.loc = src.loc
step(K, dir)
var/turf/X = K.loc
spawn(3)
del(K)
for(var/mob/M as mob in X)
if(M == src)
continue
var/damage = rand(1,5)
if(prob(70))
src<<"You attack [M] for [damage] damage!"
M<<"[src] attacks you for [damage] damage!"
M.health -= damage
deathcheck()
else
src<<"You attempt to attack [M] but miss!"
M<<"[src] attempts to attack you but misses!"
sleep(7)
src.attacking = 0
AND
proc
Megashoot() //name of proc
var/obj/H = new/obj/Megabullet
flick("Zon shoot",usr)
spawn(3)
if(src.fired == 0)
src.fired = 1
spawn(20)
src.fired = 0
H.dir = src.dir
H.loc = src.loc
while(H)
step(H,H.dir)
var/turf/T = H.loc
if(T.density == 1)
del(H)
break
for(var/mob/M as mob in T)
if(M == src)
continue
src<<"You shot [M]!"
M.health -= 15
deathcheck()
del(H)
sleep(2)
if(usr.ammo <= 0)
usr << "You need to restock your ammo [usr]"
Problem description:
Well when I kill a enemy and it's shooting.. its bullets stay where they were and if I hit the bullets it wont hurt me, but it pisses me off that they are in my way... same with my enemies that attack with sabres...... can you help me ;D
I put 2 random gun/sabre codes up their