ID:166829
 
mob/proc/pickmob()
var/List[0]
for(var/mob/M in world)
List.Add(M.key)
M.overlays+='overlay.dmi'
M.player2=0
M.it=1
world<<"font face=arial black>font color=red>GAME:[M] is it!"
player--
return

This code picks who is it, at the start of the game. But my problem is that it always picks the host. How can I make it random
1. <dm> tags!
2. You're browsing through each mob. Seeing as the host was there first, it'll always be the host. Do something like...
for(var/client/C in world) if(prob(20))
var/mob/M=C // To counter laziness.
// Do what you're doing there.
In response to Mysame
Better yet for #2, do something like this:
mob/proc/pickmob()
var/List[0]
for(var/mob/N in world) if(M.client)
List.Add( N )
var/mob/M = pick(List)//randomly picks a name from the list
M.overlays+='overlay.dmi'
M.player2=0
M.it=1
world<<"font face=arial black>font color=red>GAME:[M] is it!"
player--
return


BTW: Those small mistakes in the coding were done on purpose, to stop you from copy/pasting... but they should be easy to spot and fix ;/

Originally what you did was made EVERYBODY it because it was still in the for() loop

and see Mysame #1 >.>

- GhostAnime
In response to GhostAnime
Well I tried learning from the code that you both posted and put it into my game but, I couldn't get it to work. I probably don't understand well enough to fit it in my code. But thanks anyways for your help, I'm glad to see that BYOND has a helpful community.

I also have a problem with how the game scrolls as if it has lazyeye in it but it doesnt, the map is 17 high and 60 long, is this too long for it to scroll correctly?
In response to KirbyAllStar
I know that this is double posting but the help I got didnt fix my problem. So if anyone could help me out it would be appreciated.