
Posts
2,789
Respect
230Add +1
Forum Rank
King of the Zombies
Primary Group
Community Daedra
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
"script_noteworthy" "north_spawn""script_noteworthy" "south_spawn"coop_player_spawn_placement()
{
structs = getstructarray( "initial_spawn_points", "targetname" );
flag_wait( "all_players_connected" );
//chrisp - adding support for overriding the default spawning method
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i] setorigin( structs[i].origin );
players[i] setplayerangles( structs[i].angles );
players[i].spectator_respawn = structs[i];
}
} flag_wait( "all_players_connected" );
players = get_players();
//spawn points are split, so grab them both seperately
north_structs = getstructarray("north_spawn","script_noteworthy");
south_structs = getstructarray("south_spawn","script_noteworthy");
side1 = north_structs;
side2 = south_structs;
if(randomint(100)>50)
{
side1 = south_structs;
side2 = north_structs;
}
//spawn players on a specific side, but randomize it up a bit
for( i = 0; i < players.size; i++ )
{
if(i<2)
{
players[i] setorigin( side1[i].origin );
players[i] setplayerangles( side1[i].angles );
players[i].respawn_point = side1[i];
players[i].spawn_side = side1[i].script_noteworthy;
}
else
{
players[i] setorigin( side2[i].origin);
players[i] setplayerangles( side2[i].angles);
players[i].respawn_point = side2[i];
players[i].spawn_side = side2[i].script_noteworthy;
}
}coop_player_spawn_placement()
{
flag_wait( "all_players_connected" );
players = get_players();
//spawn points are split, so grab them both seperately
north_structs = getstructarray("north_spawn","script_noteworthy");
south_structs = getstructarray("south_spawn","script_noteworthy");
side1 = north_structs;
side2 = south_structs;
if(randomint(100)>50)
{
side1 = south_structs;
side2 = north_structs;
}
//spawn players on a specific side, but randomize it up a bit
for( i = 0; i < players.size; i++ )
{
if(i<2)
{
players[i] setorigin( side1[i].origin );
players[i] setplayerangles( side1[i].angles );
players[i].respawn_point = side1[i];
players[i].spawn_side = side1[i].script_noteworthy;
}
else
{
players[i] setorigin( side2[i].origin);
players[i] setplayerangles( side2[i].angles);
players[i].respawn_point = side2[i];
players[i].spawn_side = side2[i].script_noteworthy;
}
}
}![]() | Has released one or more maps to the UGX-Mods community. |
you posted my tutorial...