ID:149970
 
Ok, just wondering if this can be done my way?
Code is:
area/
npc_passcheck
Enter(mob/npc/M)
if(M:passlevel == 1)
return

I want to allow for PCs to enter and exit the area with no prob. As they do not have a passlevel. But it prevents the NPCs from entering. Also I can later assign different passlevels to allow some NPCs to enter but not others.

Another way to do it would be to check the mobs type, using istype, but your way allows some npcs to enter the area, if you so choose.
Try this instead:
area/npc_passcheck
Enter(mob/npc/M)
if(!M.client && M:passlevel) return 0
return ..()

If players should have no problem, then ..() should be the default whenever M.client==null.

Lummox JR