turf
Switch
var/align="red"
icon='Blue.dmi'
icon_state="switch"
Entered(atom/movable/a)
if(ismob(a))
var/mob/mobile=a
if(mobile.red)
for(var/mob/M in world)
if(M.bjailed)
M.loc=locate(8,46,2)
M.bjailed--
redtj=0
world<<"Red team freed."
else
..()
else
for(var/mob/M in world)
if(M.rjailed)
M.loc=locate(42,5,2)
M.rjailed--
bluetj=0
world<<"Blue team freed."
else
..()
Problem description:
I've tried about three different ways and have broken my head trying to figure this out. I even recoded the game(it being a small one) about four times or five. I lost count. Basically, when you enter, anyone in your team thati s jailed is free. I had it as a verb last time and it only worked for -RED-....Blue it wouldn't do anything, I have no idea why.
Any help appreciated.
Really, all you need to distinguish teams is 1 variable. The var would distinguish what team the mob was on, and could be a multi-purpose var. For example:
As you can see, a multi-purpose team var is much more useful than going through a ton of if(mob.red), if(mob.bjailed), etc. statements.
Hope that helps some.
Hiead