Post: BO2- How to change Perk cost and Zombie Spawn delay
02-03-2016, 05:54 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Anyone know how to change this? :P
Yeah, i'm noob at this, also i'm downloaded GSC Dumped files, copy the code and pasted in the GSC studio and got Bad Syntax error :/
(adsbygoogle = window.adsbygoogle || []).push({});
02-03-2016, 09:12 PM #2
anthonything
Space Ninja
Spawn rates are zombievars, and perk prices involve a more advanced trigger modification which tbh isnt worth the time
02-03-2016, 10:03 PM #3
Hum... ok thank you so much for the reply, so... Spawn rate is only by editing an DVAR... Ok, thanks again, it's all the same for all CODs right?
02-06-2016, 10:56 AM #4
BullyWiiPlaza
Climbing up the ladder
Originally posted by Guilhermex12 View Post
Anyone know how to change this? :P

This should help you to modify the spawning delay:
    set_zombie_var( "zombie_spawn_delay", 2.0, true, column ); // Base time to wait between spawning zombies. This is modified based on the round number.

    // here's the difficulty increase over time area
timer = level.zombie_vars["zombie_spawn_delay"];
if ( timer > 0.08 )
{
level.zombie_vars["zombie_spawn_delay"] = timer * 0.95;
}
else if ( timer < 0.08 )
{
level.zombie_vars["zombie_spawn_delay"] = 0.08;
}

Taken from
    maps\mp\zombies\_zm.gsc

Thus:
    noZombieSpawningDelay()
{
level endon("game_ended");
level endon("stopNoZombieSpawningDelay");

// We need to overwrite the variable constantly to keep it on
while(true)
{
level.zombie_vars["zombie_spawn_delay"] = 0.0;
level waittill("between_round_over");
}
}

disableNoZombieSpawningDelay()
{
level notify("stopNoZombieSpawningDelay");

level.zombie_vars["zombie_spawn_delay"] = 2.0;

// Recalculate the current spawning delay
for(roundsIndex = 0; roundsIndex < level.round_number; roundsIndex++)
{
timer = level.zombie_vars["zombie_spawn_delay"];

if (timer > 0.0Cool Man (aka Tustin)
{
level.zombie_vars["zombie_spawn_delay"] = timer * 0.95;
}
else if (timer < 0.0Cool Man (aka Tustin)
{
level.zombie_vars["zombie_spawn_delay"] = 0.08;
}
}
}

Now I also know why setting Zombie vars never worked for me. set_zombie_var() prefers the value from the String table over the one passed in as argument so do NOT use this function for mods. xD

    set_zombie_var( var, value, is_float, column, is_team_based )
{
if ( !IsDefined( is_float ) )
{
is_float = false;
}
if ( !IsDefined(column) )
{
column = 1;
}

// First look it up in the table
table = "mp/zombiemode.csv";
table_value = TableLookUp( table, 0, var, column );

if ( IsDefined( table_value ) && table_value != "" )
{
if( is_float )
{
value = float( table_value );
}
else
{
value = int( table_value );
}
}

if ( is_true( is_team_based ) )
{
foreach( team in level.teams )
{
level.zombie_vars[ team ][ var ] = value;
}
}
else
{
level.zombie_vars[var] = value;
}

return value;
}

The following user thanked BullyWiiPlaza for this useful post:

Guilhermex12
02-06-2016, 08:28 PM #5
:O Thank you very much man!

Also i got this code with CabCon:

SetZombieSpawnDelay(i) //0.5 Def
{
if(self.SetZombieSpawnDelay==false)
{
set_zombie_var("zombie_spawn_delay", i);
level.zombie_spawn_delay = i;
level.zombie_vars["zombie_spawn_delay"] = i;
self iprintln("Zombies Spawn Fast");
}
}

I want to receive a message by enabling the mod, as you can see, it has "self iprintln("Zombies Spawn Fast"); The mod enable in mod menu but don't show the message, do you know why?
02-07-2016, 01:35 AM #6
BullyWiiPlaza
Climbing up the ladder
Originally posted by Guilhermex12 View Post
I want to receive a message by enabling the mod, as you can see, it has "self iprintln("Zombies Spawn Fast"); The mod enable in mod menu but don't show the message, do you know why?

Just use my script, its coding is much better. It's tested and working. If you want a text being printed then just add it on top of the function:

    noZombieSpawningDelay()
{
level endon("game_ended");
level endon("stopNoZombieSpawningDelay");

self iPrintln("No Zombie Spawning Delay ^2ON");

// We need to overwrite the variable constantly to keep it on
while(true)
{
level.zombie_vars["zombie_spawn_delay"] = 0.0;
level waittill("between_round_over");
}
}


I even made a video about this mod:

The following user thanked BullyWiiPlaza for this useful post:

Guilhermex12
02-07-2016, 01:42 AM #7
Thank you! Thanks for the code :P


Also i got this:


SpawnMessageThread()
{
self thread SetZombieSpawnDelay(); wait .5;
self thread DelayMessage(); wait .5;
}
SetZombieSpawnDelay(i) //0.5 Def
{
if(self.SetZombieSpawnDelay==true)
{
self iprintln("Zombies Spawn Fast : ^2ON");
set_zombie_var("zombie_spawn_delay", i);
level.zombie_spawn_delay = i;
level.zombie_vars["zombie_spawn_delay"] = i;
}
}
DelayMessage()
{
if(self.SetZombieSpawnDelay==false)
{
self iPrintln("Zombies Spawn Fast : ^2ON");
}
}
02-07-2016, 01:45 AM #8
BullyWiiPlaza
Climbing up the ladder
The code is wrong because you're not giving an argument for the setZombieSpawnDelay() function. The variable i must be defined otherwise it doesn't know which speed to set so it will be undefined. By the way, you should click the thumbs up button instead of writing thank you :P
02-07-2016, 02:06 AM #9
Originally posted by BullyWiiPlaza View Post
Just use my script, its coding is much better. It's tested and working. If you want a text being printed then just add it on top of the function:

    noZombieSpawningDelay()
{
level endon("game_ended");
level endon("stopNoZombieSpawningDelay");

self iPrintln("No Zombie Spawning Delay ^2ON");

// We need to overwrite the variable constantly to keep it on
while(true)
{
level.zombie_vars["zombie_spawn_delay"] = 0.0;
level waittill("between_round_over");
}
}


I even made a video about this mod:


I've see your video, its amazing, i liked also :P

Do you know the Code to change zombies Speed run?
02-07-2016, 10:49 AM #10
BullyWiiPlaza
Climbing up the ladder
Originally posted by Guilhermex12 View Post
Do you know the Code to change zombies Speed run?

Yes, I use this:
    walkingZombies()
{
disableModifiedMovementSpeedZombies();

thread setZombieMovementSpeed("walk");
}

sprintingZombies()
{
disableModifiedMovementSpeedZombies();

thread setZombieMovementSpeed("sprint");
}

busChasingZombies()
{
disableModifiedMovementSpeedZombies();

thread setZombieMovementSpeed("chase_bus");
}

disableModifiedMovementSpeedZombies()
{
level notify("stopForcedMovementSpeedZombies");
}

setZombieMovementSpeed(movementSpeed)
{
level endon("game_ended");
level endon("stopForcedMovementSpeedZombies");

while(true)
{
zombies = get_round_enemy_array();

foreach(zombie in zombies)
{
if(zombie.has_legs && zombie.zombie_move_speed != movementSpeed)
{
// Prevent Zombies from being stuck in front of barriers
if(movementSpeed == "chase_bus" && !is_true(zombie.completed_emerging_into_playable_area))
{
continue;
}

zombie set_zombie_run_cycle(movementSpeed);
zombie.zombie_move_speed_original = zombie.zombie_move_speed;
}

wait 0.1;
}

wait 0.1;
}
}

The following user thanked BullyWiiPlaza for this useful post:

Guilhermex12

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo