ID:177813
 
How would i make a turf that when the use goes to enter if the usr's team is blue it enters and if not it tells the usr he can't enter
turf
teamblue
enter(var/mob/M)
if(M.team!="blue")
M << "Blue team members only!"
return 0
else
..()
In response to Ter13
Ter13 wrote:
turf
teamblue
enter(var/mob/M)
if(M.team!="blue")
M << "Blue team members only!"
return 0
else
..()

I would prefer a more general solution, instead of hardcoding the Enter() routine for each team's turf.

turf
team
var/color
Enter(mob/M)
if (istype(M, /mob) && color)
return (color == M.color)
else
return ..()

Now you can set as many team turfs you want, and add colors and teams later:

turf/team/blue
color = "blue"

etc.