Posts
167
Respect
44Add +1
Forum Rank
Pack-a-Puncher
Primary Group
Member
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!![]() | |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
round_spawning_unlim()
{
level endon( "intermission" );
level endon( "stop_spawning" );
if( level.intermission )
{
return;
}
if( level.enemy_spawns.size < 1 )
{
ASSERTMSG( "No spawners with targetname zombie_spawner in map." );
return;
}
ai_calculate_health();
count = 0;
//CODER MOD: TOMMY K
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i].zombification_time = 0;
}
//DUKIP - set to some high number so it doesn't bug out anywhere.
level.zombie_total = 9999;
mixed_spawns = 0; //DUKIP - Don't mix with dogs.
old_spawn = undefined;
while( level.is_final_step )
{
spawn_point = level.enemy_spawns[RandomInt( level.enemy_spawns.size )];
if( !IsDefined( old_spawn ) )
{
old_spawn = spawn_point;
}
else if( Spawn_point == old_spawn )
{
spawn_point = level.enemy_spawns[RandomInt( level.enemy_spawns.size )];
}
old_spawn = spawn_point;
while( get_enemy_count() > 31 )
{
wait( 0.05 );
}
// MM Mix in dog spawns...
if ( IsDefined( level.mixed_rounds_enabled ) && level.mixed_rounds_enabled == 1 )
{
spawn_dog = false;
if ( level.round_number > 30 )
{
if ( RandomInt(100) < 3 )
{
spawn_dog = true;
}
}
else if ( level.round_number > 25 && mixed_spawns < 3 )
{
if ( RandomInt(100) < 2 )
{
spawn_dog = true;
}
}
else if ( level.round_number > 20 && mixed_spawns < 2 )
{
if ( RandomInt(100) < 2 )
{
spawn_dog = true;
}
}
else if ( level.round_number > 15 && mixed_spawns < 1 )
{
if ( RandomInt(100) < 1 )
{
spawn_dog = true;
}
}
if ( spawn_dog )
{
keys = GetArrayKeys( level.zones );
for ( i=0; i<keys.size; i++ )
{
if ( level.zones[ keys[i] ].is_occupied )
{
akeys = GetArrayKeys( level.zones[ keys[i] ].adjacent_zones );
for ( k=0; k<akeys.size; k++ )
{
if ( level.zones[ akeys[k] ].is_active &&
!level.zones[ akeys[k] ].is_occupied &&
level.zones[ akeys[k] ].dog_locations.size > 0 )
{
maps\_zombiemode_dogs::special_dog_spawn( undefined, 1 );
//level.zombie_total--;
wait_network_frame();
}
}
}
}
}
}
ai = spawn_zombie( spawn_point );
if( IsDefined( ai ) )
{
//DUKIP - Don't lower it just in case.
//level.zombie_total--;
ai thread round_spawn_failsafe();
//DUKIP - deprecated var.
//count++;
}
wait( level.zombie_vars["zombie_spawn_delay"] );
wait_network_frame();
}
if( level.round_number > 3 )
{
zombies = getaiarray( "axis" );
while( zombies.size > 0 )
{
if( zombies.size == 1 && zombies[0].has_legs == true )
{
var = randomintrange(1, 4);
zombies[0] set_run_anim( "sprint" + var );
zombies[0].run_combatanim = level.scr_anim[zombies[0].animname]["sprint" + var];
}
wait(0.5);
zombies = getaiarray("axis");
}
}
}
level endon("stop_spawning");
// Waits for the time and the ai to die
round_wait()
{
/#
if (GetDVarInt("zombie_rise_test"))
{
level waittill("forever"); // TESTING: don't advance rounds
}
#/
/#
if ( GetDVarInt( "zombie_cheat" ) == 2 || GetDVarInt( "zombie_cheat" ) >= 4 )
{
level waittill("forever");
}
#/
wait( 1 );
if( flag("dog_round" ) )
{
wait(7);
while( level.dog_intermission )
{
wait(0.5);
}
}
else
{
//DUKIP - Wait while we're in final step.
while( get_enemy_count() > 0 || level.zombie_total > 0 || level.intermission || level.is_final_step )
{
wait( 0.5 );
}
}
}
//DUKIP - Destroy round hud on unlim.
hud thread HideOnUnlim();
HideOnUnlim()
{
level endon("intermission");
while(!level.is_final_step)
wait 0.05;
if(!IsDefined(self))
return;
huds = [];
huds[huds.size] = level.chalk_hud1;
if( level.round_number > 5 && level.round_number < 11 )
{
huds[huds.size] = level.chalk_hud2;
}
time = level.zombie_vars["zombie_between_round_time"];
// Pulse
fade_time = 0.35;
steps = ( time * 0.5 ) / fade_time;
for( q = 0; q < steps; q++ )
{
for( i = 0; i < huds.size; i++ )
{
if( !IsDefined( huds[i] ) )
{
continue;
}
huds[i] FadeOverTime( fade_time );
huds[i].alpha = 0;
}
wait( fade_time );
for( i = 0; i < huds.size; i++ )
{
if( !IsDefined( huds[i] ) )
{
continue;
}
huds[i] FadeOverTime( fade_time );
huds[i].alpha = 1;
}
wait( fade_time );
}
for( i = 0; i < huds.size; i++ )
{
if( !IsDefined( huds[i] ) )
{
continue;
}
huds[i] ScaleOverTime(2, 16, 16);
huds[i] FadeOverTime(2);
huds[i].color = (0,0,0);
huds[i].alpha = 0;
}
} // zombie ai and anim inits
init_anims();
if( isDefined( level.custom_ai_type ) )
{
for( i = 0; i < level.custom_ai_type.size; i++ )
{
[[ level.custom_ai_type[i] ]]();
}
}
level.is_final_step = false;
// Sets up function pointers for animscripts to refer to
level.playerlaststand_func = ::player_laststand;
// level.global_kill_func = maps\_zombiemode_spawner::zombie_death;
level.global_damage_func = maps\_zombiemode_spawner::zombie_damage;
level.global_damage_func_ads = maps\_zombiemode_spawner::zombie_damage_ads;
level.overridePlayerKilled = ::player_killed_override;
level.overridePlayerDamage = ::player_damage_override;
level notify("stop_spawning");
level.round_spawn_func = ::round_spawning_unlim;
level notify("stop_spawning");
level.round_spawn_func = maps\_zombiemode::round_spawning_unlim;