mob/proc/DeathCheck(M)
usr.Health = 0
usr.MaxHealth = 100
usr.icon_state="dead"
usr.verbs+=(/mob/Death/verb/Spectate)
usr.movestop=1
usr.Alive=0
world<<"<font color=red><b><BIG>[M] has been killed!"
deaths+=1
if(deaths==8)
world<<"<font color=purple><b>All players have died. Players being sent back to the lobby."
sleep(15)
world.Reboot()
deaths=0
else
if(usr.Alien==1)
world<<"<font color=purple><b>The Alien has been defeated. Players being sent back to the lobby."
sleep(15)
world.Reboot()
return
Problem description: Basically, I'm trying to get it sorted that instead of a reboot all players are sent back to the Lobby Map, and instead of looking to make sure 8 players have died before sending everyone back it looks for all living players who stepped through the teleporter into the actual game that have died.
This is really one of the last bits of code I need help with before I can finally release Event Horizon.
Also, this is the teleporter code stuff too.
obj/props/Portal_Base
icon='props.dmi'
icon_state="portalbase"
density=0
name= "Station Portal"
Crossed()
if(roundstarted==1)
icon_state="baseon"
usr.loc=locate(/area/Station)
usr.Alive=1
usr.RoundEntered=1
usr<<sound(null)
sleep(10)
usr<<sound('AVP.ogg',1)
else
if(roundstarted==0)
return
So, obviously the RoundEntered var is what will be defining how many people are in that round, etc. Also, is there a way to cut of people joining a round after let's say 30 seconds?
When someone dies, you just -= them from the Game list and += them to the Lobby list, then you run a check on the length of the Game list.
If the length is zero, you then know everyone is in the lobby.
Also if you wanted to block people from entering the game, you could declare a world variable, GameOpen = TRUE or FALSE.
Then you just add an IF statement to your Portals crossed() proc to check if its TRUE.
I'm sorry that I can't give code examples, I don't actually know how to make the HTML divs for dmcode snippets.