Bump(turf/building/door/T)
if(istype(T,/turf/building/door))
T.density = 0
T.icon_state = T.open_state
sleep 10
T.density = 1
T.icon_state = T.closed_state
Bump(mob/M)
if(istype(M,/mob))
if(M.aliance != src.aliance)
if(M.speed > src.speed)
M.combat(M,src)
if(src)
src.combat(src,M)
else if(src.speed >= M.speed)
src.combat(src,M)
if(M)
M.combat(M,src)
Problem description:
This code is supposed to do 2 things, 1 is to open doors when you bump into them and the other is to attack enemies when you bump into them. all it does though is attack enemies and not open doors I'm wondering how to fix this
thanks for your help