obj/Redline_Door_Openable
name = "Door"
icon = 'Door.dmi'
icon_state = "Closed"
opacity = 1
density = 1
Pickup = 0
layer = 99
Click(mob)
if(get_dist(mob,usr) <= 1)
if (icon_state == "Closed")
usr << "The door opens."
density = 0
opacity = 0
icon_state = "Open"
else
if(get_dist(mob,usr) != 0)
usr << "The door closes."
density = 1
opacity = 1
icon_state = "Closed"
else
usr << "The door is blocked!"
else
return
I'm looking for something that detects something of density in the doorway (My attempt: if(get_dist(mob,usr) != 0) so the door can't close.
NOTE: Do NOT comment the code.
EDIT: That then comes onto the next part of work: Maybe I could use that Follow Me library, but I need a idea on how to Push/Pull.