Call of Duty 5: Co-op Player Spawns

From COD Modding & Mapping Wiki
Jump to: navigation, search

You're probably wondering whether you have to add four (4) info_player_starts to your map, the answer is no. Just add in one, but you'll need to add in four script structs otherwise players will spawn inside each other (they'll be able to move out but probably wouldn't look professional) and script a function to move the players to each unique struct.

On the four (4) script_structs, give them the KVP:

"targetname" "initial_spawn_points"

You'll need need add this bit to your script (feel free to modify it as you wish if need be) and call the function shortly after maps\_load::main() is called:

	structs = getstructarray( "initial_spawn_points", "targetname" ); 
	flag_wait( "all_players_connected" ); 
	players = get_players(); 
	for( i = 0; i < players.size; i++ )
		players[i] setorigin( structs[i].origin ); 
		players[i] setplayerangles( structs[i].angles ); 

Sources: Treyarch's Wiki