How to change the max amount of zombies that spawn per round?

broken avatar :(
Created 1371 days ago
by nugget850
0 Members and 1 Guest are viewing this topic.
3,578 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 September 2016
Last active: 1332 days ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
nugget850's Groups
nugget850's Contact & Social Links
Is there a way I can change the amount of zombies that spawn per round? My map is pretty small and I would like the classic amount of zombies per round from World at War.
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 28 days ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
Signature
if I surprised you, it was because you underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
Yes, you can change the amount of zombies alive per round

Add <below> to your Usermap GSC Script in Function Main.

level.zombie_ai_limit = 31;

The default number is 24 and the maximum is 31.

Hope it helps  ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 September 2016
Last active: 1332 days ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
nugget850's Groups
nugget850's Contact & Social Links
Doesn't that just change the maximum amount of zombies that can be alive at one time? I'm looking for something that will only spawn 24 zombies per round.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 169 days ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
Doesn't that just change the maximum amount of zombies that can be alive at one time? I'm looking for something that will only spawn 24 zombies per round.

The amount of zombies are calculated differently per round.

These are all the level vars I could find so you can just edit them in your mapname.gsc(NOTE: Don't edit the actual _zm.gsc file since it won't work)
Sorry but you are not allowed to view spoiler contents.
Last Edit: November 12, 2016, 09:13:49 pm by reckfullies
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 September 2016
Last active: 1332 days ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
nugget850's Groups
nugget850's Contact & Social Links
I found this in the _zm.gsc

function get_zombie_count_for_round( n_round, n_player_count )
{
max = level.zombie_vars["zombie_max_ai"];

multiplier = n_round / 5;
if( multiplier < 1 )
{
multiplier = 1;
}

// After round 10, exponentially have more AI attack the player
if( n_round >= 10 )
{
multiplier *= n_round * 0.15;
}

if( n_player_count == 1 )
{
max += int( ( 0.5 * level.zombie_vars["zombie_ai_per_player"] ) * multiplier );
}
else
{
max += int( ( ( n_player_count - 1 ) * level.zombie_vars["zombie_ai_per_player"] ) * multiplier );
}

if( !isDefined( level.max_zombie_func ) )
{
level.max_zombie_func = &zombie_utility::default_max_zombie_func;
}

n_zombie_count = [[ level.max_zombie_func ]]( max, n_round );

return n_zombie_count;
}

Could this possibly be modified to cap the amount of zombies there are per round?
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 4 October 2016
Last active: 1338 days ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Xylozi's Groups
Xylozi's Contact & Social Links
If you assign a function to level.max_zombie_func you can override the result from that function.

To do that, you'd add something like this to your mod/map:

function main()
{
    level.max_zombie_func = &myCustomFunction;
}

function myCustomFunction()
{
    zombie_count = 10;

    return zombie_count;
}

You'd change myCustionFunction to the algorithm you want to use for the zombie count per round.

 

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
Loading ...