ID:270657
 
Well i hate to admit it but i need some help.
I have been starting on this mini game ans iam Suck..

Problem :

mob/proc
Check()
for(var/mob/M in world)
if(M.point <= 0)
world.Repop()
M.point = 14
M.rounds += 1
Checkwins()
for(var/mob/M in world)
if(M.rounds == 2)
M.Boom()
M.joined = 0
world<<"<font size = -3>[M]<b><font color = Blue> Is The Champ!"
M.wins += 1
M.rounds = 1
M.point = 14
M.red = 0
M.green = 0
M.color = ""
M.invisibility = 100
M.loc=locate(1,16,1)
world<<"<center><font size = 3><b><font color = green> [M] has won (You need to Re-join) !!"

This is My Win Proc .. SCARY huh and as u can probly see its not built for 2 player which is the the point of my game. I thought That
for(var/mob/M)
would make ever 1 in the world do the following and to my dismay it does not .... so can any 1 help me Find out a That a proc can constantly check for a var and pin-point a number that will change all the players in the would vars when 1 player gets to a certian one ?
Errm cant help ya there sorry ..
Bump : answer plz
I cannot understand the last sentence of your post, but I'll try to help a bit.

What exactly is the loop supposed to do, and what exactly is it not doing? It is not easy to tell from your code what exactly it is that you are trying to do. When one person wins, do you want everyone to go invisible, be relocated and have to rejoin, or just that one player? If everyone, then that's not going to work because you are telling it to happen only for the person that won.
In response to Loduwijk
Sorry for my last sentence and yes:

When one person wins, do you want everyone to go invisible, be relocated and have to rejoin.

Yes everyone not one player.

If everyone, then that's not going to work because you are telling it to happen only for the person that won.

This is wut i do not how to do. or having a hard time figuring out.



In response to Zog 200
Then check to see if someone won, then loop through everyone and do the changing stuff for them all if someone did.
proc/CheckWin()
var/mob/winner
for(winner)
if(whatever you want to check to see if someone won)
break
if(!winner) return
world << "[winner.name] won!"
for(var/mob/M)
//change M's stats and location and stuff to reset it here

Something more like that. Then you also have easy access to the winner since the winner variable points to whoever just won. So anywhere after the if(!winner)return line, since that line is what checks to see if there is a winner, you can do whatever you want to the winning mob because of its success, like change the wins variable.