ID:179534
 
I am trying to make it so when you have a certain var(Key)
you can walkthrough a turf of a density with one
and not just make the density of the player 0 becuase to many bad things happen that way
This is what i have
mob/var/Key
turf
InvisWall
Enter(mob/M as mob)
if(density==1)
if(M.Key == 1)
src.density=0
..()
else
return
So can someone please help
Thanx
My fist game had this, back when I had no clue what the density var was :o)

mob/var/pass //can you pass through walls?

turf/Wall
Enter(mob/M)
if(ismob(M))
if(M.pass) return ..()
else return 0

Something like that should work.
In response to Foomer
Thanx Foomer but when i put it in what do i do to make it so i can walk Through it
Thanx
In response to Greg
If pass = 1, you pass through, if pass = 0, you don't.
In response to Foomer
Thank you Foomer
It woiks like a charm
LOL