UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Have Infinite Zombies in a Round?

broken avatar :(
Created 11 years ago
by jbird
0 Members and 1 Guest are viewing this topic.
2,522 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
×
jbird's Groups
How do you get there to be infinite zombies in a round? But with only 24 max spawned in the map at a time obviously.
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
This code was originally for ConvictioNDR
GSC to modify: _zombiemode.gsc

Code Snippet
Plaintext
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");
}

}
}
In round_spawning() add a new endon (underneath level endon("intermission")):
Code Snippet
Plaintext
level endon("stop_spawning");

Then in the round_wait() function replace with this:
Code Snippet
Plaintext
// 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 );
}
}
}

To hide the round numbers this is what I did:
chalk_one_up()
add this at the bottom of the function:
Code Snippet
Plaintext
	//DUKIP - Destroy round hud on unlim.
hud thread HideOnUnlim();

Code Snippet
Plaintext

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;
}
}

Define level.is_final_step at the middle of the main function like so:
Code Snippet
Plaintext
	// 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;

In the place where you can to execute the unlimited round stuff do:
Code Snippet
Plaintext
level notify("stop_spawning");
level.round_spawn_func = ::round_spawning_unlim;
If this code is located in another GSC do
Code Snippet
Plaintext
level notify("stop_spawning");
level.round_spawn_func = maps\_zombiemode::round_spawning_unlim;
(At least I think that should work, if not just do the code handling in _zombiemode)
Last Edit: March 13, 2015, 01:15:20 am by DidUknowiPwn

 
Loading ...