ID:173920
 
Hi can anyone help me make a shooting npc.

he is my shoot verb

Shoot()
if(src.Ammo <= 1)
src << "Not enough Ammo to fire"
return // stop the verb
src.Ammo -= 1
icon_state = "Shooting"
var/obj/A = new /obj/Bullet (src.loc)
A.dir = src.dir
walk(A,A.dir,1)
sleep(10)
icon_state = ""
del(A)
The NPCs won't automatically call their shoot verb. Remember: The computer is stupid. You have to force it into seeming smart.

You need an AI proc which moves all of the NPCs, and calls their shoot verbs/procs when necessary.
In response to Crispy
so its not possible?
In response to CrazyFighter
it is possible but the npc wont use the shoot verb by itself, it will only shoot when you tell it to, if you want it to do it on its own you have to code its AI to make it do so.