ID:144910
 
Code:
mob/enemies/Cannodumb
icon='enemies.dmi'
name = "Cannodumb"
icon_state = "cannodum"
hp = 55
maxhp = 55
player = 0
var/mob/you/P
New()
..()
invisshot()






area/MonsterBlock
Enter(mob/M)
if(ismob(M))
if(M.client) return ..()
else return 0
else return ..()






mob
proc
invisshot()
set background=1
var/obj/H = new/obj/invisshot
if(src.fired == 0)
src.fired = 1
spawn()
src.fired = 0
H.dir = src.dir
H.loc = src.loc
while(H)
walk(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)
cannodumattack()





mob
proc
cannodumattack()
set background=1
var/obj/K = new/obj/cannodumattack
if(src.fired == 0)
src.fired = 1
spawn()
src.fired = 0
K.dir = src.dir
K.loc = src.loc
var/damage = 60
while(K)
walk(K,K.dir)
var/turf/F = K.loc
if(F.density == 1)
del(K)
break
for(var/mob/M as mob in F)
if(M == src)
continue
if(M.client)
M.hp -= damage
src <<"Cannodum hits [M] for [damage]!"
M <<"You are being attacked by [src]!"
src.level_up()
M.death_check(src)


Problem description:
this is my npc shoot attack but it keeps shooting both attacks together i want it 2 shoot the invisshot and if the invisshot hits a mob then it shoots the cannodumattack
help!!!
In response to Dazz513
Don't bump a topic before a day has gone by. People will get to it when they can. Be patient.


Why does it seem like your posting the same snippet over and over?