#include maps\_utility; #include maps\_anim; #include common_scripts\utility; #include maps\_vehicle; #include maps\_vehicle_aianim; main() { precachevehicle("uaz"); maps\_uaz::main("vehicle_uaz_light"); maps\_load::main(); level.early_level[ level.script ] = false; level.friendlyFireDisabled = 1; level.player takeallweapons(); thread objective1(); } objective1 () //initial objective triggered by simple player movement //the player's squad was getting ambushed { objective_add(1, "active", "Search_the_area_for_hidden_arsenals."); objective_current(1); firstMoveTrigger = getEnt("firstMoveTrigger", "targetname"); firstMoveTrigger waittill ("trigger"); objective_state(1, "invisible"); LastSolider = getEnt("lastsolider", "targetname"); LastSolider thread magic_bullet_shield(); NewAddedEnemies = getEntArray("NewAddedEnemy", "targetname"); array_thread (NewAddedEnemies, ::groupSpawn); wait 2; thread objective2(); } groupSpawn() { self.count = 1; self stalingradSpawn(); } objective2 () //triggered when combat happens //player is asked to clear the enemies { objective_add(2, "active", "Clear_a_way_out."); objective_current(2); level.player giveWeapon("m16_basic"); level.player giveWeapon("fraggrenade"); level.player giveWeapon("flash_grenade"); level.player switchToWeapon("m16_basic"); firstSoliders = getEntArray("firstSoliders", "targetname"); array_thread(firstSoliders, ::magic_bullet_shield); array_thread(firstSoliders, ::KilledAfterPlayerMove); lastSoliderDieTrigger = getEnt("lastSoliderDieTrigger", "targetname"); lastSoliderDieTrigger waittill ("trigger"); LastSolider = getEnt("lastsolider", "targetname"); LastSolider doDamage( LastSolider.health, LastSolider.origin); obj2CompleteTrigger = getEnt("obj2Complete", "targetname"); obj2CompleteTrigger waittill ("trigger"); objective_state(2, "invisible"); wait 2; thread objective3(); } KilledAfterPlayerMove() //make the target die after a random time //random time is less than 8 seconds { wait RandomInt(8); self doDamage( self.health, self.origin ); } objective3() //triggered when player has found the arsenal //player is asked to find the smuggler's boss and take him out //ally vehicle will spawn and crash to the fence //boss name differs everytime on load //guards standing near to the boss keeps spawning //player hence have to hit the target precisely from a long distance //sniper rifle is hidden in several positions within the map { carAlliesArray = getEntArray("carAllies", "targetname"); array_thread(carAlliesArray, ::noDamage); gunSmuggler = getEnt("boss1", "targetname"); objective_add(3, "active", "Find_and_take_out_the_smuggler's_boss_"+ gunSmuggler.name); objective_current(3); guards = getEntArray("guardsUndead", "targetname"); array_thread(guards, ::keepSpawning); gunSmuggler waittill("death"); objective_state(3, "done"); wait 4 ; missionSuccess ("fun",false); } noDamage() { self thread magic_bullet_shield(); } keepSpawning() { self.count = 1; for (;;) { guy = self stalingradSpawn(); guy waittill ( "death" ); wait 5; self.count++; } }