var/sudden_total=0
var/standard_total=0
var/survival_total=0
mob/proc/VOTE()
switch(input("What mode would you like to play?") in list("Standard Freeze Tag","Sudden Death Tag","Survival Freeze Tag"))
if("Standard Freeze Tag")
standard_total++
if("Sudden Death Tag")
sudden_total++
if("Survival Freeze Tag")
survival_total++
mob
Staff
verb
Vote()
set category = "GM"
set name = "Vote"
if(begun)
return
else if(AutoHost=="On")
return
else
if(players.len)
sudden_total=0
standard_total=0
survival_total=0
for(var/mob/M in players)
M.VOTE()
world <<"GAME: You have 10 Seconds to Vote!"
sleep(100)
if(standard_total > sudden_total && standard_total > survival_total)
world.Begin_Regular()
else if(sudden_total > standard_total && sudden_total > survival_total)
world.Begin_Sudden_Death()
else if(survival_total > standard_total && survival_total > sudden_total)
world.Begin_Survival()
else
if(standard_total == sudden_total || standard_total == survival_total || sudden_total == survival_total)
world <<"<font size = 4 color=red>GAME: The Vote was a TIE! Re-Vote!"
Vote()
Problem description:
Well as the topic title said, it only allows the Host who inniates the verb Vote. I know this isn't the most effecient code, but I want to get it working before I try and perfect it. Any suggestions as to why M.VOTE() doesn't call for all the mobs?
Sorry if this is a newbish question, if it is just tell me and I'll try and figure it out lol.
-KirbyAllStar
Festina lente
2) The reason why it's not being called to everyone or after sometime is that the loop you made waits for the person to reply before moving on. A way to give it to everyone at (almost) the same time is to use spawn()
- GhostAnime