ID:149671
 
I have been having trouble with hockey. After a game is supposed to move the players in the game to a new loc and reset all of the game vars. here is what I have...

proc/GameOver()
for(var/obj/puck/O)
if(O.loc == locate(10,11,1))
del(O)
gameon=0
teamgoalsA=0
teamgoalsB=0
char1=null
char2=null
char3=null
char4=null

for(var/mob/M in world)
if(M.key == char1)
usr.client.mob = new/mob/char
del(usr)
else
if(M.key == char2)
usr.client.mob = new/mob/char
del(usr)
else
if(M.key == char3)
usr.client.mob = new/mob/char
del(usr)
else
if(M.key == char4)
usr.client.mob = new/mob/char
del(usr)


all it does is delete the player who scored the last goal, (I think because he is the one who is calling this proc). But anyways if you can help I would really appreciate it. I have tried about a million different things to try and fix this.
Try setting thier loc to something like (1,1,1).
Instead of del(usr) put
del(src)

-Non-PC
In response to Sariat
well the problem is that I set up a huge system for this game based on four characters. I could have long ago just made it so that when you enter a game you are added the verbs necessary to play but I didnt. So now I think I am going to have to redo the entire system (dang).
In response to Canar
If you need to do it, do it now before you've end up spending eight months on the game only to decide then that you need to redo it.
In response to Foomer
yeah and I have only spent about four days on it so far. I guess I should get this out of the way while I am on spring break.