Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function boss_fight()
- {
- level.zombies_dead = 0;
- exit_door = GetEnt( "exit_door", "targetname");
- boss_door_trigger = GetEnt( "boss_door_trigger", "targetname");
- boss_door = GetEnt( "boss_door", "targetname");
- boss_door_trigger SetHintString( "Activate Lockdown First");
- trig = GetEnt( "boss_fight_trigger", "targetname");
- trig SetHintString( "Press and Hold ^3[{+activate}]^7 to begin lockdown [recommend all players in room]");
- trig waittill( "trigger", player);
- IPrintLnBold( "Lockdown Started" );
- thread play_2D_sound( "colossus");
- boss_door_trigger Delete();
- trig Delete();
- spawners = GetEntArray( "boss_spawner", "targetname" );
- for(i = 0; i < spawners.size; i++)
- {
- spawners[i] thread spawnzombies();
- }
- }
- function spawnzombies()
- {
- zombie = zombie_utility::spawn_zombie( self );
- zombie thread isdead();
- wait(1);
- zombie_1 = zombie_utility::spawn_zombie( self );
- zombie_1 thread isdead();
- wait(1);
- zombie_2 = zombie_utility::spawn_zombie( self );
- zombie_2 thread isdead();
- wait(1);
- zombie_3 = zombie_utility::spawn_zombie( self );
- zombie_3 thread isdead();
- wait(1);
- zombie_4 = zombie_utility::spawn_zombie( self );
- zombie_4 thread isdead();
- wait(1);
- zombie_5 = zombie_utility::spawn_zombie( self );
- zombie_5 thread isdead();
- wait(20);
- zombie_6 = zombie_utility::spawn_zombie( self );
- zombie_6 thread isdead();
- wait(1);
- zombie_7 = zombie_utility::spawn_zombie( self );
- zombie_7 thread isdead();
- wait(1);
- zombie_8 = zombie_utility::spawn_zombie( self );
- zombie_8 thread isdead();
- wait(1);
- zombie_9 = zombie_utility::spawn_zombie( self );
- zombie_9 thread isdead();
- wait(1);
- zombie_10 = zombie_utility::spawn_zombie( self );
- zombie_10 thread isdead();
- wait(1);
- zombie_11 = zombie_utility::spawn_zombie( self );
- zombie_11 thread isdead();
- wait(1);
- zombie_12 = zombie_utility::spawn_zombie( self );
- zombie_12 thread isdead();
- wait(1);
- zombie_13 = zombie_utility::spawn_zombie( self );
- zombie_13 thread isdead();
- wait(20);
- zombie_14 = zombie_utility::spawn_zombie( self );
- zombie_14 thread isdead();
- wait(1);
- zombie_15 = zombie_utility::spawn_zombie( self );
- zombie_15 thread isdead();
- wait(1);
- zombie_16 = zombie_utility::spawn_zombie( self );
- zombie_16 thread isdead();
- wait(1);
- zombie_17 = zombie_utility::spawn_zombie( self );
- zombie_17 thread isdead();
- wait(1);
- zombie_18 = zombie_utility::spawn_zombie( self );
- zombie_18 thread isdead();
- wait(1);
- zombie_19 = zombie_utility::spawn_zombie( self );
- zombie_19 thread isdead();
- wait(1);
- zombie_20 = zombie_utility::spawn_zombie( self );
- zombie_20 thread isdead();
- wait(1);
- zombie_21 = zombie_utility::spawn_zombie( self );
- zombie_21 thread isdead();
- wait(1);
- }
- function isdead()
- {
- self waittill("death");
- level.zombies_dead ++;
- if(level.zombies_dead == 66)
- {
- boss_fight_end();
- }
- }
- function boss_fight_end()
- {
- thread objectives( "Complete the Pack-A-Punch Ritual COMPLETE", true);
- boss_door = GetEnt( "boss_door", "targetname");
- exit_door = GetEnt( "boss_exit", "targetname");
- cliff_door = GetEnt( "cliff_door", "targetname");
- IPrintLnBold("Lockdown Complete");
- exit_door MoveZ(-300, 3);
- boss_door MoveZ(-300, 3);
- cliff_door MoveZ(-300, 3);
- level flag::set( "zone_14-15-5" );
- jolt = GetEnt( "jolt_2", "targetname");
- Earthquake( 0.30, 3, jolt.origin, 1000 );
- wait(3);
- cliff_door Delete();
- boss_door Delete();
- exit_door Delete();
- wait(4);
- thread objectives( "Align the Four Cannons", false);
- }
- function easter_egg()
- {
- //IPrintLnBold("System Lockdown Override Complete");
- //door = GetEntArray("easter_egg_door","targetname");
- //for(i=0;i<door.size;i++)
- //{
- // door[i] Delete();
- //}
- //level flag::set( "zone_15-17" );
- level.cannon_move_degrees = 5;
- level.cannons_done = 0;
- thread cannon_1();
- thread cannon_2();
- thread cannon_3();
- thread cannon_4();
- }
- function isdone()
- {
- if(level.cannons_done == 4)
- {
- IPrintLnBold("System Lockdown Override Complete");
- thread objectives( "Align the Four Cannons COMPLETE", true);
- door = GetEntArray("easter_egg_door","targetname");
- for(i=0;i<door.size;i++)
- {
- door[i] Delete();
- }
- level flag::set( "zone_15-17" );
- wait(7);
- thread objectives( "Power the Cannons", false);
- thread easter_egg();
- }
- }
- function cannon_1()
- {
- platform = GetEnt( "platform_1","targetname");
- start = platform.origin;
- cannon = GetEnt( "cannon_1","targetname");
- trig = GetEnt( "ee_trigger_1","targetname");
- trig TriggerEnable( true);
- trig waittill("trigger", player);
- player_off_trig = true;
- angles = 0;
- cannon endon("cannon_done");
- while(1)
- {
- if( player IsTouching(trig))
- {
- if(player_off_trig == true)
- cannon thread spawnzombie();
- platform MoveTo(start - (0,0,4), 1);
- player_off_trig = false;
- //platform thread platform_sound();
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(level.cannon_move_degrees, 1);
- angles += level.cannon_move_degrees;
- wait(1);
- //IPrintLnBold(cannon.angles);
- if(angles == 180)
- {
- level.cannons_done ++;
- if(level.cannons_done == 1)
- {
- IPrintLnBold("1 out of 4 Complete");
- }
- else if(level.cannons_done == 2)
- {
- IPrintLnBold("2 out of 4 Complete");
- }
- else if(level.cannons_done == 3)
- {
- IPrintLnBold("3 out of 4 Complete");
- }
- platform MoveTo(start, 1);
- zm_powerups::specific_powerup_drop( "empty_bottle", start + (0,0,40));
- thread isdone();
- cannon notify("cannon_done");
- }
- }
- else
- {
- platform MoveTo(start, 1);
- //platform thread platform_sound();
- if(player_off_trig == false)
- {
- platform stoploopsound( 0.2 );
- wait(3);
- player_off_trig = true;
- }
- if(player_off_trig == true)
- {
- cannon notify("off_platform");
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(-level.cannon_move_degrees, 1);
- angles -= level.cannon_move_degrees;
- wait(1);
- if(angles == 0)
- {
- platform stoploopsound( 0.2 );
- cannon_1();
- }
- }
- wait(0.05);
- }
- }
- }
- function spawnzombie()
- {
- spawner = GetEnt( "special_spawner", "targetname" );
- zombie_utility::spawn_zombie( spawner);
- wait(0.5);
- zombie_utility::spawn_zombie( spawner);
- wait(0.5);
- zombie_utility::spawn_zombie( spawner);
- wait(0.5);
- zombie_utility::spawn_zombie( spawner);
- wait(0.5);
- zombie_utility::spawn_zombie( spawner);
- self endon("cannon_done");
- self endon("off_platform");
- while(1)
- {
- if(level.remainingzw < 15)
- zombie_utility::spawn_zombie( spawner);
- wait(1);
- }
- }
- function cannon_2()
- {
- platform = GetEnt( "platform_2","targetname");
- start = platform.origin;
- cannon = GetEnt( "cannon_2","targetname");
- trig = GetEnt( "ee_trigger_2","targetname");
- trig TriggerEnable( true);
- trig waittill("trigger", player);
- player_off_trig = true;
- angles = 0;
- cannon endon("cannon_done");
- while(1)
- {
- if( player IsTouching(trig))
- {
- if(player_off_trig == true)
- cannon thread spawnzombie();
- platform MoveTo(start - (0,0,4), 1);
- player_off_trig = false;
- //platform thread platform_sound();
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(level.cannon_move_degrees, 1);
- angles += level.cannon_move_degrees;
- wait(1);
- //IPrintLnBold(cannon.angles);
- if(angles == 180)
- {
- level.cannons_done ++;
- if(level.cannons_done == 1)
- {
- IPrintLnBold("1 out of 4 Complete");
- }
- else if(level.cannons_done == 2)
- {
- IPrintLnBold("2 out of 4 Complete");
- }
- else if(level.cannons_done == 3)
- {
- IPrintLnBold("3 out of 4 Complete");
- }
- platform MoveTo(start, 1);
- zm_powerups::specific_powerup_drop( "empty_bottle", start + (0,0,40));
- thread isdone();
- cannon notify("cannon_done");
- }
- }
- else
- {
- platform MoveTo(start, 1);
- //platform thread platform_sound();
- if(player_off_trig == false)
- {
- platform stoploopsound( 0.2 );
- wait(3);
- player_off_trig = true;
- }
- if(player_off_trig == true)
- {
- cannon notify("off_platform");
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(-level.cannon_move_degrees, 1);
- angles -= level.cannon_move_degrees;
- wait(1);
- if(angles == 0)
- {
- platform stoploopsound( 0.2 );
- cannon_2();
- }
- }
- wait(0.05);
- }
- }
- }
- function cannon_3()
- {
- platform = GetEnt( "platform_3","targetname");
- start = platform.origin;
- cannon = GetEnt( "cannon_3","targetname");
- trig = GetEnt( "ee_trigger_3","targetname");
- trig TriggerEnable( true);
- trig waittill("trigger", player);
- player_off_trig = true;
- angles = 0;
- cannon endon("cannon_done");
- while(1)
- {
- if( player IsTouching(trig))
- {
- if(player_off_trig == true)
- cannon thread spawnzombie();
- platform MoveTo(start - (0,0,4), 1);
- player_off_trig = false;
- //platform thread platform_sound();
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(level.cannon_move_degrees, 1);
- angles += level.cannon_move_degrees;
- wait(1);
- //IPrintLnBold(cannon.angles);
- if(angles == 180)
- {
- level.cannons_done ++;
- if(level.cannons_done == 1)
- {
- IPrintLnBold("1 out of 4 Complete");
- }
- else if(level.cannons_done == 2)
- {
- IPrintLnBold("2 out of 4 Complete");
- }
- else if(level.cannons_done == 3)
- {
- IPrintLnBold("3 out of 4 Complete");
- }
- platform MoveTo(start, 1);
- zm_powerups::specific_powerup_drop( "empty_bottle", start + (0,0,40));
- thread isdone();
- cannon notify("cannon_done");
- }
- }
- else
- {
- platform MoveTo(start, 1);
- //platform thread platform_sound();
- if(player_off_trig == false)
- {
- platform stoploopsound( 0.2 );
- wait(3);
- player_off_trig = true;
- }
- if(player_off_trig == true)
- {
- cannon notify("off_platform");
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(-level.cannon_move_degrees, 1);
- angles -= level.cannon_move_degrees;
- wait(1);
- if(angles == 0)
- {
- platform stoploopsound( 0.2 );
- cannon_3();
- }
- }
- wait(0.05);
- }
- }
- }
- function cannon_4()
- {
- platform = GetEnt( "platform_4","targetname");
- start = platform.origin;
- cannon = GetEnt( "cannon_4","targetname");
- trig = GetEnt( "ee_trigger_4","targetname");
- trig TriggerEnable( true);
- trig waittill("trigger", player);
- player_off_trig = true;
- angles = 0;
- cannon endon("cannon_done");
- while(1)
- {
- if( player IsTouching(trig))
- {
- if(player_off_trig == true)
- cannon thread spawnzombie();
- platform MoveTo(start - (0,0,4), 1);
- player_off_trig = false;
- //platform thread platform_sound();
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(level.cannon_move_degrees, 1);
- angles += level.cannon_move_degrees;
- wait(1);
- //IPrintLnBold(cannon.angles);
- if(angles == 180)
- {
- level.cannons_done ++;
- if(level.cannons_done == 1)
- {
- IPrintLnBold("1 out of 4 Complete");
- }
- else if(level.cannons_done == 2)
- {
- IPrintLnBold("2 out of 4 Complete");
- }
- else if(level.cannons_done == 3)
- {
- IPrintLnBold("3 out of 4 Complete");
- }
- platform MoveTo(start, 1);
- zm_powerups::specific_powerup_drop( "empty_bottle", start + (0,0,40));
- thread isdone();
- cannon notify("cannon_done");
- }
- }
- else
- {
- platform MoveTo(start, 1);
- //platform thread platform_sound();
- if(player_off_trig == false)
- {
- platform stoploopsound( 0.2 );
- wait(3);
- player_off_trig = true;
- }
- if(player_off_trig == true)
- {
- cannon notify("off_platform");
- platform playloopsound ("elevator_loop");
- cannon RotateYaw(-level.cannon_move_degrees, 1);
- angles -= level.cannon_move_degrees;
- wait(1);
- if(angles == 0)
- {
- platform stoploopsound( 0.2 );
- cannon_4();
- }
- }
- wait(0.05);
- }
- }
- }
- function cannon_fire()
- {
- thread play_2D_sound("cannon_fire");
- zombies = zombie_utility::get_round_enemy_array();
- if ( isdefined( zombies ) )
- {
- array::run_all( zombies, &Kill );
- }
- level flag::clear( "spawn_zombies" );
- wait(4);
- foreach(player in level.players)
- {
- player SetFlashBanged( true, 0.8 );
- Earthquake( 0.22, 5, player.origin, 200 );
- }
- level notify("after_easter_egg");
- //time to Delete Stuff
- grow_souls = GetEntArray("grow_soul","targetname");
- for(i=0;i<grow_souls.size;i++)
- {
- grow_souls[i] Delete();
- }
- after_easter_egg = GetEntArray("after_easter_egg","targetname");
- for(i=0;i<after_easter_egg.size;i++)
- {
- after_easter_egg[i] Delete();
- }
- new_sand = GetEntArray("new_sand","targetname");
- for(i=0;i<new_sand.size;i++)
- {
- new_sand[i] MoveZ(640,1);
- }
- trig = GetEnt("cutscene_trig","targetname");
- level flag::set( "zone_17-18" );
- trig waittill("trigger",player);
- trig Delete();
- cutscene();
- }
- function cutscene()
- {
- zone18 = GetEnt("zone18","targetname");
- peeps_moved = 0;
- struct1 = struct::get("cutscene_struct1","targetname");
- struct2 = struct::get("cutscene_struct2","targetname");
- struct3 = struct::get("cutscene_struct3","targetname");
- struct4 = struct::get("cutscene_struct4","targetname");
- after_struct1 = struct::get("after_struct1","targetname");
- after_struct2 = struct::get("after_struct2","targetname");
- after_struct3 = struct::get("after_struct3","targetname");
- after_struct4 = struct::get("after_struct4","targetname");
- level notify("cutscene");
- foreach(player in level.players)
- {
- player DisableWeapons();
- player SetClientUIVisibilityFlag( "hud_visible", 0 );
- player DontInterpolate();
- peeps_moved ++;
- if(peeps_moved == 1)
- player SetOrigin( struct1.origin);
- player SetPlayerAngles( struct1.angles );
- if(peeps_moved == 2)
- player SetOrigin( struct2.origin);
- player SetPlayerAngles( struct2.angles );
- if(peeps_moved == 3)
- player SetOrigin( struct3.origin);
- player SetPlayerAngles( struct3.angles );
- if(peeps_moved == 4)
- player SetOrigin( struct4.origin);
- player SetPlayerAngles( struct4.angles );
- player FreezeControls( true );
- }
- VideoStart("sandstorm_cutscene");
- thread play_2D_sound("cutscene");
- wait( 64 );
- VideoStop("sandstorm_cutscene");
- peeps_moved_back = 0;
- foreach(player in level.players)
- {
- player EnableWeapons();
- player SetClientUIVisibilityFlag( "hud_visible", 1 );
- player DontInterpolate();
- peeps_moved_back ++;
- if(peeps_moved_back == 1)
- player SetOrigin( after_struct1.origin);
- player SetPlayerAngles( after_struct1.angles );
- if(peeps_moved_back == 2)
- player SetOrigin( after_struct2.origin);
- player SetPlayerAngles( after_struct2.angles );
- if(peeps_moved_back == 3)
- player SetOrigin( after_struct3.origin);
- player SetPlayerAngles( after_struct3.angles );
- if(peeps_moved_back == 4)
- player SetOrigin( after_struct4.origin);
- player SetPlayerAngles( after_struct4.angles );
- player FreezeControls( false );
- }
- level flag::set( "zone_13-8" );
- level flag::set( "zone_13-9" );
- thread zombiesleft_hud("Undead to Slay You:");
- wait(1);
- zone18 Delete();
- thread objectives( "Power the Cannons COMPLETE", true);
- special_spawner = GetEnt("special_spawner","targetname");
- wait(7);
- thread objectives( "DIE", false);
- thread play_2D_sound("heros_theme");
- level endon("intermission");
- while(1)
- {
- special_spawner thread goodbye_cruel_world();
- wait(1);
- }
- }
- function goodbye_cruel_world()
- {
- zombie = zombie_utility::spawn_zombie( self );
- }
Add Comment
Please, Sign In to add comment