mob
DblClick(mob/M)
if(istype(M,/mob/))
switch(usr:weapon)
if(null)
if(M in oview(1))
view() << "<strong>[src] attacks [M]!"
M.health -= 5
DeathCheck()
if("Shotgun")
if(usr.cwa <= 0)
usr << "<strong>Not enough ammo!"
else
var/obj/normal/munition/Shot/N = new /obj/normal/munition/Shot
missile(N, usr, M)
usr.cwa -= 1
del(N)
world << "<strong>[usr] fires the shotgun at [M]!"
Shotgun(M)
else
..()
Problem description:
Whenever I test this in my game, I DblClick a mob, but it registers as a turf, so nothing happens. I am one hundred percent sure the target I DblClicking is a mob. I've tried is without the If(istype) part, but again, the turf is affected, not the mob.
but yet you have the usr shoot at M?
You're missing the src.
Either that or you meant to use the client click.