mob
var/fire_on = 0
proc/on_fire()
if(src.fire_on != 1)
src.fire_on = 1
spawn(4)
src.fire_on = 0
view(7) << "pif-paf"
var/obj/bullet/B = new()
B.dir = usr.dir
B.loc = usr.loc
while(B)
var/nextLocation = step_to(B, src.loc)
var/turf/T = nextLocation
if(B)
step_to(B, src.loc)
sleep(0.0001)
for(var/mob/M as mob in T)
usr << "You shot [M]."
sleep(2)
M.HP -=30
del B
if(T.density != 0)
usr << "You shot [T]."
sleep(2)
del B
for(var/obj/O in T)
if((O.density == 1) && (B.loc == O.loc))
usr << "You shot [O]."
sleep(2)
del B
Problem description:
In a collision with bullets Turf gives an error. Bullet did not respond to mobs and objects.
I would comment that i'm not sure Turfs work like that, as in allowing you to define one simply based on location parameters, but i'll go check that now.