proc
Out()
src << "<font color = red><b>You're out!<br>You must now observe.</b></font>"
src.invisibility = 101
src.verbs -= new/mob/PC/verb/Fire1
src.verbs -= new/mob/PC/verb/Fire2
src.out = 1
sleep(30)
if(src.field == "A")
if(src.team == 1)
f1t1 --
if(f1t1 <= 0)
for(var/mob/PC/M in world)
if(f1t2L == "[M.name]")
for(var/mob/PC/U in M.party)
U.money += 50
if(U.out)
U.invisibility = 0
U.verbs += /mob/PC/verb/Fire1
U.verbs += /mob/PC/verb/Fire2
U.hits = 0
U.out = 0
U.hits = 0
U.loc = locate(2,2,1)
if(f1t1L == "[M.name]")
for(var/mob/PC/S in M.party)
if(S.out)
S.invisibility = 0
S.verbs += /mob/PC/verb/Fire1
S.verbs += /mob/PC/verb/Fire2
S.hits = 0
S.out = 0
S.hits = 0
S.loc = locate(2,2,1)
world <<"<font color = blue><b> Team 2 is victorious at field A!</font>"
var/obj/RefereeA/O = new /obj/RefereeA(src.loc)
O.loc = locate(9,8,1)
if(src.team == 2)
f1t2 --
if(f1t2 <= 0)
for(var/mob/PC/M in world)
if(f1t1L == "[M.name]")
for(var/mob/PC/U in M.party)
U.money += 50
if(U.out)
U.invisibility = 0
U.verbs += /mob/PC/verb/Fire1
U.verbs += /mob/PC/verb/Fire2
U.hits = 0
U.out = 0
U.loc = locate(2,2,1)
if(f1t2L == "[M.name]")
for(var/mob/PC/S in M.party)
if(S.out)
S.invisibility = 0
S.verbs += /mob/PC/verb/Fire1
S.verbs += /mob/PC/verb/Fire2
S.hits = 0
S.out = 0
S.hits = 0
S.loc = locate(2,2,1)
world <<"<font color = blue><b> Team 1 is victorious at field A!</font>"
var/obj/RefereeA/O = new /obj/RefereeA(src.loc)
O.loc = locate(9,8,1)
if(src.field == "B")
if(src.team == 1)
f2t1 --
if(f2t1 <= 0)
for(var/mob/PC/M in world)
if(f2t2L == "[M.name]")
for(var/mob/PC/U in M.party)
U.money += 50
if(U.out)
U.invisibility = 0
U.verbs += /mob/PC/verb/Fire1
U.verbs += /mob/PC/verb/Fire2
U.hits = 0
U.out = 0
U.loc = locate(2,2,1)
if(f2t1L == "[M.name]")
for(var/mob/PC/S in M.party)
if(S.out)
S.invisibility = 0
S.verbs += /mob/PC/verb/Fire1
S.verbs += /mob/PC/verb/Fire2
S.hits = 0
S.out = 0
S.hits = 0
S.loc = locate(2,2,1)
world <<"<font color = blue><b> Team 2 is victorious at field B!</font>"
var/obj/RefereeB/O = new /obj/RefereeB(src.loc)
O.loc = locate(2,8,1)
if(src.team == 2)
f2t2 --
if(f2t2 <= 0)
for(var/mob/PC/M in world)
if(f2t1L == "[M.name]")
for(var/mob/PC/U in M.party)
U.money += 50
if(U.out)
U.invisibility = 0
U.verbs += /mob/PC/verb/Fire1
U.verbs += /mob/PC/verb/Fire2
U.hits = 0
U.out = 0
U.loc = locate(2,2,1)
if(f2t2L == "[M.name]")
for(var/mob/PC/S in M.party)
if(S.out)
S.invisibility = 0
S.verbs += /mob/PC/verb/Fire1
S.verbs += /mob/PC/verb/Fire2
S.hits = 0
S.out = 0
S.hits = 0
S.loc = locate(2,2,1)
world <<"<font color = blue><b> Team 1 is victorious at field B!</font>"
var/obj/RefereeB/O = new /obj/RefereeB(src.loc)
O.loc = locate(2,8,1)
Here's the Referee Code incase it's needed
obj
RefereeA
icon = 'Player.dmi'
icon_state = "referee"
density = 1
var
team1
team2
verb
Join_Game()
set src in oview(1)
if(usr.in_party)
if(usr.name == "[usr.party_leader]")
switch(input("Would You like to enlist your team?") in list ("Yes","No"))
if("Yes")
if(!src.team1)
src.team1 = "[usr.party_leader]"
f1t1L = "[usr.party_leader]"
usr << "<font color = green> Your team is enlisted as team 1!</font>"
else
if(!src.team2)
src.team2 = "[usr.party_leader]"
f1t2L = "[usr.party_leader]"
usr << "<font color = green>Your team is enlisted as team 2!</font>"
world << "<font color = blue><b> The Game at Field A is about to begin!</b></font>"
for(var/mob/M in world)
if(M.name == "[src.team1]")
for(var/mob/U in M.party)
U.loc = locate(2,2,2)
world << "<font color = green>Member of Team 1 ready in field A!</font>"
U.field = "A"
f1t1 += 1
U.team = 1
if(M.name == "[src.team2]")
for(var/mob/S in M.party)
S.loc = locate(24,24,2)
world << "<font color = green>Member of Team 2 ready in field A!</font>"
S.field = "A"
f1t2 += 1
S.team = 2
sleep(40)
del(src)
else
usr << "The game has begun."
else
usr << "Only the leader of your party can enlist you!"
Problem description:
This little problem has been giving me quite a bit of angst over the past two days. It's probably a pretty simple solution, but I'm missing it. What happens is it works perfectly the first time but the second time when a team is defeated/player gets out - it doesn't relocate and reset each player or the referee.