Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function init()
- {
- level.opening_credits = true; //set true if you want to give me some credit for all this, as well as have a cool opening credits thingy. If you already have something like this, send me a message
- level.move_on_x_axis_1 = false; //What axis the first (courtyard) door moves on. Only set ONE to true.
- level.move_on_y_axis_1 = false;
- level.move_on_z_axis_1 = true;
- level.door_1_distance = -124; //amount of units for the first door to move on the axis defined above. put a - before it if you want it to move in the opposite direction of the arrow in radiant.
- level.door_1_time = 2; //time in seconds for first door to move.
- level.move_on_x_axis_2 = false; //What axis the second (Pack-a-punch) door moves on. Only set ONE to true.
- level.move_on_y_axis_2 = true;
- level.move_on_z_axis_2 = false;
- level.door_2_distance = -145; //amount of units for the second door to move on the axis defined above. put a - before it if you want it to move in the opposite direction of the arrow in radiant.
- level.door_2_time = 2; //time in seconds for second door to move.
- level.move_on_x_axis_3 = true; //What axis the third (tunnel) door moves on. Only set ONE to true.
- level.move_on_y_axis_3 = false;
- level.move_on_z_axis_3 = false;
- level.door_3_distance = 85; //amount of units for the third door to move on the axis defined above. put a - before it if you want it to move in the opposite direction of the arrow in radiant.
- level.door_3_time = 2; //time in seconds for third door to move.
- level.arena_zone_flag = "an_excellent_flag"; //flag to activate arena zone so zombies can spawn there and player doesn't die when he goes there.
- level.tunnel_zone_flag = "another_excellent_flag"; //flag to activate tunnel zone so zombies can spawn there and player doesn't die when he goes there.
- level.brutus_spawn_wait_time_courtyard = 10; //time between brutus spawns in Courtyard
- level.brutus_spawn_wait_time_arena = 5; //time between brutus spawns in arena during infinite spawning
- level.brutus_spawn_wait_time_tunnel = 1; //time between brutus spawns in tunnel during infinite spawning
- level.zombie_arena_wait_time = 15; //time it takes in arena before zombies start spawning too
- level.after_zombie_arena_wait_time = 20; //time after the zombies start spawning in the arena before the arena is over.
- level.soul_hintstring = "Press ^3[{+activate}]^7 to collect soul";
- level.soul_pedestal_hintstring = "Press ^3[{+activate}]^7 to place souls";
- level.item_hintstring = "Press ^3[{+activate}]^7 to pick up item";
- level.all_graves_collected_sound = "crumple";
- level.place_graves_hintstring = "Press ^3[{+activate}]^7 to place graves";
- level.end_game_message = "Thanks for Playing! You Have Escaped"; //What it says when you is da winner
- level.gravestones = GetEntArray("gravestone","targetname");
- for( i=0;i<level.gravestones.size;i++ )
- {
- gravestone_trig = GetEnt(level.gravestones[i].target,"targetname");
- gravestone_trig thread nonohintstring();
- }
- level.gravestones_collected = 0;
- new_gravestone_trig = GetEnt("new_gravestone_trig","targetname");
- new_gravestone_trig thread nonohintstring();
- new_gravestones = GetEntArray("new_gravestone","targetname");
- for( i=0;i<new_gravestones.size;i++ )
- {
- new_gravestones[i] Hide();
- }
- if(level.opening_credits == true)
- {
- level thread opening_credits();
- }
- item();
- }
- function opening_credits()
- {
- wait(5);
- thread creat_simple_intro_hud("GULAG", 50, 70, 4, 5);
- wait(3);
- thread creat_simple_intro_hud("A Map By Psh", 50, 50, 2, 5);
- wait(2);
- thread creat_simple_intro_hud( "Scripting by Abnormal202", 50, 30, 2, 5 ); //if you had other scripters work on this, you could just say "easter egg by Abnormal202"
- }
- function creat_simple_intro_hud( text, align_x, align_y, font_scale, fade_time )
- {
- hud = NewHudElem();
- hud.foreground = true;
- hud.fontScale = font_scale;
- hud.sort = 1;
- hud.hidewheninmenu = false;
- hud.color = ( 0.541, 0, 0 ); //feel free to change the color of the words if you want. I have it set to blood red
- hud.alignX = "left";
- hud.alignY = "bottom";
- hud.horzAlign = "left";
- hud.vertAlign = "bottom";
- hud.x = align_x;
- hud.y = hud.y - align_y;
- hud.alpha = 1;
- hud SetText( text );
- wait( 8 );
- hud fadeOverTime( fade_time );
- hud.alpha = 0;
- wait( fade_time );
- hud Destroy();
- }
- function nonohintstring()
- {
- self Hide();
- }
- function item()
- {
- item = GetEnt("item","targetname");
- item_trig = GetEnt("item_trig","targetname");
- item_trig SetHintString(level.item_hintstring);
- item_trig waittill("trigger", player);
- item Delete();
- item_trig Delete();
- gravestones();
- }
- function gravestones()
- {
- level.gravestones = GetEntArray("gravestone","targetname");
- for( i=0;i<level.gravestones.size;i++ )
- {
- level.gravestones[i] thread gravestone_triggers();
- }
- }
- function gravestone_triggers()
- {
- gravestone_trig = GetEnt(self.target,"targetname");
- gravestone_trig Show();
- gravestone_trig waittill("trigger",player);
- self Delete();
- gravestone_trig Delete();
- level.gravestones_collected ++;
- //IPrintLnBold("collected " + level.gravestones_collected + " out of " + level.gravestones.size);
- if(level.gravestones_collected == level.gravestones.size)
- {
- PlaySoundAtPosition( level.all_graves_collected_sound, player.origin );
- gravestone_place_down();
- }
- }
- function gravestone_place_down()
- {
- trig = GetEnt("new_gravestone_trig","targetname");
- trig Show();
- trig SetHintString(level.place_graves_hintstring);
- trig waittill("trigger",player);
- trig Delete();
- new_gravestones = GetEntArray("new_gravestone","targetname");
- for( i=0;i<new_gravestones.size;i++ )
- {
- new_gravestones[i] Show();
- }
- level.door_1 = GetEnt("courtyard_door","targetname");
- if(level.move_on_x_axis_1 == true)
- level.door_1 MoveX(level.door_1_distance,level.door_1_time);
- if(level.move_on_y_axis_1 == true)
- level.door_1 MoveY(level.door_1_distance,level.door_1_time);
- if(level.move_on_z_axis_1 == true)
- level.door_1 MoveZ(level.door_1_distance,level.door_1_time);
- level flag::clear( "spawn_zombies" );
- spawnbrutus1();
- }
- function spawnbrutus1()
- {
- for( i=0;i<level.gravestones.size;i++ )
- {
- thread brutus::alternate_spawn_brutus();
- wait(level.brutus_spawn_wait_time_courtyard);
- }
- }
- function souls_collected()
- {
- trig = GetEnt("soul_pedestal_trigger","targetname");
- trig SetHintString(level.soul_pedestal_hintstring);
- struct = struct::get("soul_pedestal_location","targetname");
- trig waittill("trigger",player);
- fxOrg = util::spawn_model( "tag_origin", struct.origin);
- struct Delete();
- PlayFxOnTag( SOUL_FX, fxOrg, "tag_origin");
- trig Delete();
- pap_door();
- }
- function pap_door()
- {
- level.door_2 = GetEnt("pap_door","targetname");
- if(level.move_on_x_axis_2 == true)
- level.door_2 MoveX(level.door_2_distance,level.door_2_time);
- if(level.move_on_y_axis_2 == true)
- level.door_2 MoveY(level.door_2_distance,level.door_2_time);
- if(level.move_on_z_axis_2 == true)
- level.door_2 MoveZ(level.door_2_distance,level.door_2_time);
- level flag::set( level.arena_zone_flag );
- arena_fight();
- }
- function arena_fight()
- {
- trig = GetEnt("need_all_players_trigger","targetname");
- trig waittill("trigger",player);
- trig Delete();
- if(level.move_on_x_axis_2 == true)
- level.door_2 MoveX(-level.door_2_distance,level.door_2_time);
- if(level.move_on_y_axis_2 == true)
- level.door_2 MoveY(-level.door_2_distance,level.door_2_time);
- if(level.move_on_z_axis_2 == true)
- level.door_2 MoveZ(-level.door_2_distance,level.door_2_time);
- wait(level.door_2_time);
- //IPrintLnBold("let the fighting begin");
- level flag::clear( "spawn_zombies" );
- level thread brutus_spawn_in_arena();
- level thread zombies_spawn_too();
- level.using_zombie_powerups = false;
- }
- function brutus_spawn_in_arena()
- {
- brutus_spawners = struct::get_array("brutus_arena_spawn","targetname");
- level endon("no_mo_brutus");
- while(1)
- {
- rand = RandomIntRange( 0, brutus_spawners.size );
- brutus_spawners[rand] thread brutus::arena_spawn_brutus();
- //IPrintLnBold(rand);
- wait(level.brutus_spawn_wait_time_arena);
- }
- }
- function zombies_spawn_too()
- {
- wait(level.zombie_arena_wait_time);
- level flag::set( "spawn_zombies" );
- //IPrintLnBold("zombies enter the ring");
- wait(level.after_zombie_arena_wait_time);
- level notify("no_mo_brutus");
- //IPrintLnBold("stop spawning the Bruti");
- struct = struct::get("max_ammo_spawnpoint","targetname");
- level.using_zombie_powerups = true;
- thread zm_powerups::specific_powerup_drop( "full_ammo", struct.origin);
- level.door_3 = GetEnt("door_3","targetname");
- if(level.move_on_x_axis_3 == true)
- level.door_3 MoveX(level.door_3_distance,level.door_3_time);
- if(level.move_on_y_axis_3 == true)
- level.door_3 MoveY(level.door_3_distance,level.door_3_time);
- if(level.move_on_z_axis_3 == true)
- level.door_3 MoveZ(level.door_3_distance,level.door_3_time);
- level flag::set( level.tunnel_zone_flag );
- level.using_zombie_powerups = false;
- foreach(player in level.players)
- {
- player thread tunnel_fight();
- }
- endgame();
- }
- function tunnel_fight()
- {
- trigs = GetEntArray("tunnel_trig","targetname");
- while(1)
- {
- for(i=0;i<trigs.size;i++)
- {
- if(self IsTouching(trigs[i]))
- {
- //IPrintLnBold("get Triggered");
- trigs[i] thread spawn_dat_boi();
- }
- }
- wait(level.brutus_spawn_wait_time_tunnel);
- }
- }
- function spawn_dat_boi()
- {
- struct = struct::get(self.target,"targetname");
- if(IsDefined(struct))
- //IPrintLnBold("struct is defined");
- struct thread brutus::arena_spawn_brutus();
- }
- function endgame()
- {
- trig = GetEnt("end_trigger","targetname");
- trig waittill("trigger",player);
- level.all_players_near_end = true;
- end_it_now();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement