ID:166294
 
How do I make invisible turf so that it won't let you pass unless you talk to an NPC and make it when you talk to an NPC like you get talk=1. Then if talk=1, the turf let's you go through and if talk=0, it stop's you.

~DARK~
turf
talkfirst
Enter(mob/M)
if(ismob(M) && M.client)
if(M.talk)
return ..()
else
return 0
In response to Kore2
Thanks
In response to Kore2
Kore2 wrote:
turf
> talkfirst
> Enter(mob/M)
> if(ismob(M) && M.client)
> if(M.talk)
> return ..()
> else
> return 0


You might want to consider commenting your snippets in the future so that people won't just get the code, but actually know how it works.
In response to Mecha Destroyer JD
< Usually I do, but I was rushing.
In response to Kore2
Commented Version
turf
talkfirst
Enter(mob/M)//What happens when something tries to enter the turf.
if(ismob(M) && M.client)//if it is a mob and it is a person.
if(M.talk)//and if talk=1
return ..()//Let them through
else //If talk=0
return 0//Don't let them through.