List of Zombie Variables

This page contains a list of variables that will change different aspects of your map, such as the starter weapon or zombie move speed.

All these variables (unless stated otherwise) should be put into your mapname.gsc below zm\_usermap::main in the main function.

This page requires basic scripting knowledge. Sources are at the bottom of the page.

## Change Starting Weapon

The following variables

```
level.default\_laststandpistol = GetWeapon("WEAPON\_NAME");
level.default\_solo\_laststandpistol = GetWeapon("WEAPON\_NAME\_UPGRADED");
level.laststandpistol = level.default\_laststandpistol;
level.start\_weapon = level.default\_laststandpistol;

```

## Round Variables

Variables that will affect round based mechanics like respawning players between rounds or how long round intermission takes.

**Set whether or not spectators should respawn in-between rounds**

```
zombie_utility::set_zombie_var("spectators_respawn", true);

```

**Will slowly kill zombies who are stuck (recommended to use zm\_cleanup\_mgr)**

```
zombie_utility::set_zombie_var("zombie_use_failsafe", true);

```

**How long until the next round begins**

```
zombie_utility::set_zombie_var("zombie_between_round_time", 10);

```

**How long the end game scoreboard will show on screen**

```
zombie_utility::set_zombie_var("zombie_intermission_time", 15);

```

**How long until zombies spawn from the beginning of the game**

```
zombie_utility::set_zombie_var("game_start_delay", 0, false, column);

```

## Change starting round

```
level.first_round = true;

level.start_round = GetGametypeSetting("startRound");
level.round_number = level.start_round;
level.enable_magic = GetGametypeSetting("magic");
level.headshots_only = GetGametypeSetting("headshotsonly");
level.player_starting_points = level.round_number * 500;
level.round_start_time = 0;
level.pro_tips_start_time = 0;
level.intermission = false;
level.dog_intermission = false;
level.zombie_total = 0; // Total number of zombies left to spawn
level.zombie_respawns = 0; // Total number of zombies that need to be respawned due to cleanup
level.total_zombies_killed = 0;
level.hudelem_count = 0;

level.zm_loc_types = [];
level.zm_loc_types["zombie_location"] = []; // List of normal zombie spawners (other types will be added in the zone manager)
level.zm_variant_type_max = [];
level.zm_variant_type_max["walk"] = [];
level.zm_variant_type_max["run"] = [];
level.zm_variant_type_max["sprint"] = [];
level.zm_variant_type_max["super_sprint"] = [];
level.zm_variant_type_max["walk"]["down"] = 14;
level.zm_variant_type_max["walk"]["up"] = 16;
level.zm_variant_type_max["run"]["down"] = 13;
level.zm_variant_type_max["run"]["up"] = 12;
level.zm_variant_type_max["sprint"]["down"] = 9;
level.zm_variant_type_max["sprint"]["up"] = 8;
level.zm_variant_type_max["super_sprint"]["down"] = 1;
level.zm_variant_type_max["super_sprint"]["up"] = 1;

level.current_zombie_array = [];
level.current_zombie_count = 0;
level.zombie_total_subtract = 0;
level.destructible_callbacks = [];
difficulty = 1;
column = int(difficulty) + 1;

//#######################################################################
//  zombie_utility::set_zombie_var( identifier,                     value,  float,  column );
// AI
zombie_utility::set_zombie_var("zombie_health_increase", 100, false, column); //    cumulatively add this to the zombies' starting health each round (up to round 10)
zombie_utility::set_zombie_var("zombie_health_increase_multiplier", 0.1, true, column); //  after round 10 multiply the zombies' starting health by this amount
zombie_utility::set_zombie_var("zombie_health_start", 150, false, column); //   starting health of a zombie at round 1
zombie_utility::set_zombie_var("zombie_spawn_delay", 2.0, true, column); // Time to wait between spawning zombies.  This is modified based on the round number.
zombie_utility::set_zombie_var("zombie_new_runner_interval", 10, false, column); // Interval between changing walkers who are too far away into runners
zombie_utility::set_zombie_var("zombie_move_speed_multiplier", 4, false, column); //    Multiply by the round number to give the base speed value.  0-40 = walk, 41-70 = run, 71+ = sprint
zombie_utility::set_zombie_var("zombie_move_speed_multiplier_easy", 2, false, column); //   Multiply by the round number to give the base speed value.  0-40 = walk, 41-70 = run, 71+ = sprint
zombie_utility::set_zombie_var("zombie_max_ai", 24, false, column); //  Base number of zombies per player (modified by round #)
zombie_utility::set_zombie_var("zombie_ai_per_player", 6, false, column); //    additional zombie modifier for each player in the game
zombie_utility::set_zombie_var("below_world_check", -1000); //  Check height to see if a zombie has fallen through the world.
// Life and death
zombie_utility::set_zombie_var("player_base_health", 100); // Base health of a player
zombie_utility::set_zombie_var("penalty_no_revive", 0.10, true, column); // Percentage of money you lose if you let a teammate die
zombie_utility::set_zombie_var("penalty_died", 0.0, true, column); // Percentage of money lost if you die
zombie_utility::set_zombie_var("penalty_downed", 0.05, true, column); // Percentage of money lost if you go down // ww: told to remove downed point loss
zombie_utility::set_zombie_var("zombie_score_kill_4player", 50); // Individual Points for a zombie kill in a 4 player game
zombie_utility::set_zombie_var("zombie_score_kill_3player", 50); // Individual Points for a zombie kill in a 3 player game
zombie_utility::set_zombie_var("zombie_score_kill_2player", 50); // Individual Points for a zombie kill in a 2 player game
zombie_utility::set_zombie_var("zombie_score_kill_1player", 50); // Individual Points for a zombie kill in a 1 player game
zombie_utility::set_zombie_var("zombie_score_damage_normal", 10); // points gained for a hit with a non-automatic weapon
zombie_utility::set_zombie_var("zombie_score_damage_light", 10); // points gained for a hit with an automatic weapon
zombie_utility::set_zombie_var("zombie_score_bonus_melee", 80); // Bonus points for a melee kill
zombie_utility::set_zombie_var("zombie_score_bonus_head", 50); // Bonus points for a head shot kill
zombie_utility::set_zombie_var("zombie_score_bonus_neck", 20); // Bonus points for a neck shot kill
zombie_utility::set_zombie_var("zombie_score_bonus_torso", 10); // Bonus points for a torso shot kill
zombie_utility::set_zombie_var("zombie_score_bonus_burn", 10); // Bonus points for a burn kill
zombie_utility::set_zombie_var("zombie_flame_dmg_point_delay", 500);
zombie_utility::set_zombie_var("zombify_player", false); // Default to not zombify the player till further support
```
Source: https://www.ugx-mods.com/forum/scripting/87/how-to-change-the-max-amount-of-zombies-that-spawn-per-round/13967/