PrecacheShader( "black" ); // powerup Vars set_zombie_var( "zombie_insta_kill", 0 ); set_zombie_var( "zombie_point_scalar", 1 ); set_zombie_var( "zombie_drop_item", 0 ); set_zombie_var( "zombie_timer_offset", 350 ); // hud offsets set_zombie_var( "zombie_timer_offset_interval", 30 ); set_zombie_var( "zombie_powerup_insta_kill_on", false ); set_zombie_var( "zombie_powerup_point_doubler_on", false ); set_zombie_var( "zombie_powerup_point_doubler_time", 30 ); // length of point doubler set_zombie_var( "zombie_powerup_insta_kill_time", 30 ); // length of insta kill set_zombie_var( "zombie_powerup_drop_increment", 2000 ); // lower this to make drop happen more often set_zombie_var( "zombie_powerup_drop_max_per_round", 4 ); // lower this to make drop happen more often //DUKIP - Why make it level-wide it's not right? //This is not even used really. set_zombie_var( "zombie_powerup_zombie_blood_on", 0 ); set_zombie_var( "zombie_powerup_zombie_blood_time", 30 ); //DUKIP - Set vars through player like in T6. level thread onPlayerConnect(); // powerups level._effect["powerup_on"] = loadfx( "misc/fx_zombie_powerup_on" ); level._effect["powerup_grabbed"] = loadfx( "misc/fx_zombie_powerup_grab" ); level._effect["powerup_grabbed_wave"] = loadfx( "misc/fx_zombie_powerup_wave" );
init_powerups();
thread watch_for_drop(); }
//DUKIP - Connecting functions onPlayerConnect() { for( ;; ) { level waittill( "connecting", player ); player thread init_player_zombie_blood_vars(); } }
//DUKIP - Follow how T6 does it. init_player_zombie_blood_vars() { self.zombie_vars[ "zombie_powerup_zombie_blood_on" ] = 0; self.zombie_vars[ "zombie_powerup_zombie_blood_time" ] = 30; } //
powerup_hud_overlay() { level.powerup_hud_array = []; level.powerup_hud_array[0] = true; level.powerup_hud_array[1] = true; //DUKIP - Same as below //deprecated as t4 uses level vars instead of self for powerup huds //requires rewriting, will keep it simple for now. //level.powerup_hud_array[2] = true;
// special powerup list for the teleporter drop add_zombie_special_drop( powerup_name ) { level.zombie_special_drop_array[ level.zombie_special_drop_array.size ] = powerup_name; }
if( level.powerup_drop_count >= level.zombie_vars["zombie_powerup_drop_max_per_round"] ) { println( "^3POWERUP DROP EXCEEDED THE MAX PER ROUND!" ); return; }
// some guys randomly drop, but most of the time they check for the drop flag if (rand_drop > 2) { if (!level.zombie_vars["zombie_drop_item"]) { return; }
debug = "score"; } else { debug = "random"; }
// never drop unless in the playable area playable_area = getentarray("playable_area","targetname");
//chris_p - fixed bug where you could not have more than 1 playable area trigger for the whole map valid_drop = false; for (i = 0; i < playable_area.size; i++) { if (powerup istouching(playable_area[i])) { valid_drop = true; } }
// spawn the model, do a ground trace and place above // start the movement logic, spawn the fx // start the time out logic // start the grab logic }
// // Special power up drop - done outside of the powerup system. special_powerup_drop(drop_point) { // if( level.powerup_drop_count == level.zombie_vars["zombie_powerup_drop_max_per_round"] ) // { // println( "^3POWERUP DROP EXCEEDED THE MAX PER ROUND!" ); // return; // }
// never drop unless in the playable area playable_area = getentarray("playable_area","targetname"); //chris_p - fixed bug where you could not have more than 1 playable area trigger for the whole map valid_drop = false; for (i = 0; i < playable_area.size; i++) { if (powerup istouching(playable_area[i])) { valid_drop = true; break; } }
if(!valid_drop) { powerup Delete(); return; }
powerup special_drop_setup(); }
// // Pick the next powerup in the list powerup_setup() { powerup = get_next_powerup();
// // Get the special teleporter drop special_drop_setup() { powerup = undefined; is_powerup = true; // Always give something at lower rounds or if a player is in last stand mode. if ( level.round_number <= 10 || maps\_laststand::player_num_in_laststand() ) { powerup = get_next_powerup(); } // Gets harder now else { powerup = level.zombie_special_drop_array[ RandomInt(level.zombie_special_drop_array.size) ]; if ( level.round_number > 15 && ( RandomInt(100) < (level.round_number - 15)*5 ) ) { powerup = "nothing"; } } //MM test Change this if you want the same thing to keep spawning // powerup = "dog"; switch ( powerup ) { // Don't need to do anything special case "nuke": case "insta_kill": case "double_points": case "carpenter": //DUKIP - Added zombie blood. case "blood": break;
// Limit max ammo drops because it's too powerful case "full_ammo": if ( level.round_number > 10 && ( RandomInt(100) < (level.round_number - 10)*5 ) ) { // Randomly pick another one powerup = level.zombie_powerup_array[ RandomInt(level.zombie_powerup_array.size) ]; } break;
index = maps\_zombiemode_weapons::get_player_index(self); sound = undefined; rand = randomintrange(0,3); vox_rand = randomintrange(1,100); //RARE: This is to setup the Rare devil response lines percentage = 1; //What percent chance the rare devil response line has to play
//This keeps multiple voice overs from playing on the same player (both killstreaks and headshots). if (level.player_is_speaking != 1 && isDefined(sound)) { level.player_is_speaking = 1; self playsound(sound, "sound_done"); self waittill("sound_done"); level.player_is_speaking = 0; }
// check to see if this is on or not if ( level.zombie_vars["zombie_powerup_insta_kill_on"] ) { // reset the time and keep going level.zombie_vars["zombie_powerup_insta_kill_time"] = 30; return; }
/* players = get_players(); for (i = 0; i < players.size; i++) { players[i] playloopsound ("insta_kill_loop"); } */
// time it down! while ( level.zombie_vars["zombie_powerup_insta_kill_time"] >= 0) { wait 0.1; level.zombie_vars["zombie_powerup_insta_kill_time"] = level.zombie_vars["zombie_powerup_insta_kill_time"] - 0.1; // self setvalue( level.zombie_vars["zombie_powerup_insta_kill_time"] ); }
players = get_players(); for (i = 0; i < players.size; i++) { //players[i] stoploopsound (2);
players[i] playsound("insta_kill");
}
temp_enta stoploopsound(2); // turn off the timer level.zombie_vars["zombie_powerup_insta_kill_on"] = false;
// remove the offset to make room for new powerups, reset timer for next time level.zombie_vars["zombie_powerup_insta_kill_time"] = 30; //level.zombie_timer_offset += level.zombie_timer_offset_interval; //self destroy(); temp_enta delete(); }
// check to see if this is on or not if ( level.zombie_vars["zombie_powerup_point_doubler_on"] ) { // reset the time and keep going level.zombie_vars["zombie_powerup_point_doubler_time"] = 30; return; }
// time it down! while ( level.zombie_vars["zombie_powerup_point_doubler_time"] >= 0) { wait 0.1; level.zombie_vars["zombie_powerup_point_doubler_time"] = level.zombie_vars["zombie_powerup_point_doubler_time"] - 0.1; //self setvalue( level.zombie_vars["zombie_powerup_point_doubler_time"] ); }
// turn off the timer level.zombie_vars["zombie_powerup_point_doubler_on"] = false; players = get_players(); for (i = 0; i < players.size; i++) { //players[i] stoploopsound("double_point_loop", 2); players[i] playsound("points_loop_off"); } temp_ent stoploopsound(2);
// remove the offset to make room for new powerups, reset timer for next time level.zombie_vars["zombie_powerup_point_doubler_time"] = 30; //level.zombie_timer_offset += level.zombie_timer_offset_interval; //self destroy(); temp_ent delete(); } devil_dialog_delay() { wait(1.8); level thread play_devil_dialog("nuke_vox");
if( player maps\_laststand::player_is_in_laststand() ) { return false; }
if ( player isnotarget() ) { return false; }
//DUKIP - Ignore the player if they have the flag set. //As well as ignoreMeFlag is true if( is_true(ignoreMeFlag) && player.ignoreme ) { return false; }
return true; }
Add this at the bottom of _zombiemode_utility:
Code Snippet
Plaintext
//DUKIP - is_true function is_true(check) { return(IsDefined(check) && check); }
Next step, fixing the zombie_pathing code to ignore pathnodes leading to player with ignoreme being true. _zombiemode_spawner.gsc -> Line 3066 Add parameter true to is_player_valid. if( !is_player_valid( self.favoriteenemy, true ) )
Information: PLEASE PLEASE PLEASE change the VisionSetNaked on line 1418 in _zombiemode_powerups to your map's vision. (You can check this by going to maps\createart\yourmap_art.gsc, inside is a function called set_all_players_visionset that first parameter is the vision you want to revert back to.
For testing purposes I did it simple, find the sound from BO2 Origins using master131's Sound Studio tool (requires having the Origins DLC to get the sound). You can save this as a soundalias or add ontop of yours, just be sure that the headers match 100% or else you'll get errors. (Note: Sound name in the tool should be called vox_zmba_powerup_zombie_blood_d----.flac, or so. IMPORTANT: Convert the sound in Audacity, File -> Export Audio -> Save as type -> WAV (Microsoft) signed 16 bit PCM)
Save this as a plain-text file in mods/modname/vision/zm_blood.vision Add in mod.csv "rawfile,vision/zm_blood.vision"
Model: Export the model from BO2 Origins using Tom's Lime exporter (don't need to mess with it in Maya so make sure to export the XMODEL_EXPORT so you can just go through AssMan easily), follow this setup for the materials. (Note: In my material image I changed the material property in the XMODEL_EXPORT to not be "bo2_mtl_~~~" to do the same open both XMODEL_EXPORT's in Notepad search MATERIALS and you'll see the bo2_mtl~~~ just remove the bo2_ from it and save the file.) xmodel use this:
List of GSC's modified: dlc3_code.gsc _zombiemode_powerups.gsc _zombiemode_spawner.gsc _zombiemode_utility.gsc
Edit: Script changes at 1:40 PM PST. Update #2 to include zombies ignoring you completely. Update #3 to include tutorial on how to fix is_player_valid function or notably the box not being able to be purchased with zombie blood enabled. Update #4 to include no points while in zombie blood. Update #5 Undid all modifications to is_player_valid functions and other GSC, went with more proper method. Only modifying _zombiemode_spawner.gsc to ignore goals with players in zombie blood. That should be it really there's no reason for it to require any more changes.
Last Edit: February 20, 2015, 09:44:44 pm by DidUknowiPwn