A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Dead Players

Author Topic: Dead Players (3 messages, Page 1 of 1)
Moderators: Dennis

Hensman
Joined: Oct 30, 2011

Your argument is invalid.


Posted: Oct 30, 2011 10:20 AM    Msg. 1 of 3       
Hey, I was wondering, when I'm scripting a multiplayer map, how do I make something happen when a player dies?

Example: When player dies, a new encounter of covenant spawns.

Thanks in advance!


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Oct 30, 2011 12:44 PM    Msg. 2 of 3       
(script continuous whatever
(sleep_until (!= (list_count (players)) player_spawn_count) 15)
(ai_place <ai>)
)


player_spawn_count is one of those random globals you never see, there is plenty of interesting globals listed in kornman's research pages for making OS. Anyways, player_spawn_count shows the number of players in a server, and (list_count (players)) shows the number of living players in a server. This script checks once every half a second, to see if the living players, and actual player count are different, if so, ai_place whatever encounter you put in the place of the red.


Hensman
Joined: Oct 30, 2011

Your argument is invalid.


Posted: Oct 30, 2011 05:04 PM    Msg. 3 of 3       
Ah, worked perfectly! Thanks a lot :D

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 8:02 AM 141 ms.
A Halo Maps Website