turf
JailBorder
icon = 'Border.dmi'
RedTop
icon_state = "red"
density = 1
Enter(mob/M)
if(istype(M))
if(M.team == 2)
return
src << output("What are you doing? Trying to release the oponent?!","log")
else if(M.team == 1)
if(Red_Jail_Broken == 0)
if(M.dir == SOUTH||SOUTHEAST||SOUTHWEST)
Red_Jail_Broken = 1
src.density = 0
src.icon_state = ""
view(10,src) << "<font color=red>Quickly, red team, escape!</font>"
sleep(70)
src.density = 1
src.icon_state = "red"
Red_Jail_Broken = 0
else return
Problem description:
So I have 2 teams. The #1 team is red team, #2 team is blue team. So when a blue red guy gets in jail he needs a red guy to attempt to enter one of the turfs from the outside. The only issue is that my code does not check the direction. I can go north with a red guy in the red Jail and the jail will still dissapear, I only want red guys going say, south, which would be from the outside, to be able to "open" the jail. Another issue is that the turfs do not become dense. I am wondering if for some reason I am not allowed to change a turf's density at runtime.
Please Help, And Thank-You.
Im not sure but you can try this: