// 18 max entities. main: // run this first before "level waittill spawn". initializes (spawns in) all mines, bombs, and explosions while map first loads, to help increase fps. local.minebomb1 = spawn script_model targetname "ffminebomb1" local.minebomb1 model "emitters/explosion_mine.tik" local.minebomb1.origin = ( 5143 -726 -403 ) local.minebomb1.angles = ( 0 -90 0 ) local.minebomb1 anim idle local.minebomb1 notsolid local.minebomb1.scale = 2 local.minebomb2 = spawn script_model targetname "ffminebomb2" local.minebomb2 model "emitters/explosion_mine.tik" local.minebomb2.origin = ( 5847 -1236 -403 ) local.minebomb2.angles = ( 0 -90 0 ) local.minebomb2 anim idle local.minebomb2 notsolid local.minebomb2.scale = 2 local.minebomb3 = spawn script_model targetname "ffminebomb3" local.minebomb3 model "emitters/explosion_mine.tik" local.minebomb3.origin = ( 5143 -1236 -403 ) local.minebomb3.angles = ( 0 -90 0 ) local.minebomb3 anim idle local.minebomb3 notsolid local.minebomb3.scale = 2 local.minebomb4 = spawn script_model targetname "ffminebomb4" local.minebomb4 model "emitters/explosion_mine.tik" local.minebomb4.origin = ( 5847 -1747 -403 ) local.minebomb4.angles = ( 0 -90 0 ) local.minebomb4 anim idle local.minebomb4 notsolid local.minebomb4.scale = 2 local.minebomb5 = spawn script_model targetname "ffminebomb5" local.minebomb5 model "emitters/explosion_mine.tik" local.minebomb5.origin = ( 5143 -1747 -403 ) local.minebomb5.angles = ( 0 -90 0 ) local.minebomb5 anim idle local.minebomb5 notsolid local.minebomb5.scale = 2 local.minebomb6 = spawn script_model targetname "ffminebomb6" local.minebomb6 model "emitters/explosion_mine.tik" local.minebomb6.origin = ( 5495 -2263 -403 ) local.minebomb6.angles = ( 0 -90 0 ) local.minebomb6 anim idle local.minebomb6 notsolid local.minebomb6.scale = 2 local.finalbomb1 = spawn script_model targetname "finalbomb1" local.finalbomb1 model "items/explosive2.tik" local.finalbomb1.origin = ( 6011 -2534 -190 ) local.finalbomb1.angles = ( 0 0 0 ) local.finalbomb1.scale = 4 local.finalbomb1 notsolid local.finalbomb2 = spawn script_model targetname "finalbomb2" local.finalbomb2 model "items/explosive2.tik" local.finalbomb2.origin = ( 5686 -2534 -190 ) local.finalbomb2.angles = ( 0 180 0 ) local.finalbomb2.scale = 4 local.finalbomb2 notsolid local.finalbomb3 = spawn script_model targetname "finalbomb3" local.finalbomb3 model "items/explosive2.tik" local.finalbomb3.origin = ( 5307 -2534 -190 ) local.finalbomb3.angles = ( 0 0 0 ) local.finalbomb3.scale = 4 local.finalbomb3 notsolid local.finalbomb4 = spawn script_model targetname "finalbomb4" local.finalbomb4 model "items/explosive2.tik" local.finalbomb4.origin = ( 4982 -2534 -190 ) local.finalbomb4.angles = ( 0 180 0 ) local.finalbomb4.scale = 4 local.finalbomb4 notsolid local.fbexplode1 = spawn script_model targetname "fbexplode1" local.fbexplode1 model "fx/fx_truck_explosion.tik" local.fbexplode1.origin = local.finalbomb1.origin + ( 0 -100 0 ) local.fbexplode1.angles = ( 0 -90 0 ) local.fbexplode1.scale = 1.75 local.fbexplode1 anim aaaa local.fbexplode1 notsolid local.fbexplode2 = spawn script_model targetname "fbexplode2" local.fbexplode2 model "fx/fx_truck_explosion.tik" local.fbexplode2.origin = local.finalbomb2.origin + ( 0 -100 0 ) local.fbexplode2.angles = ( 0 -90 0 ) local.fbexplode2.scale = 1.75 local.fbexplode2 anim aaaa local.fbexplode2 notsolid local.fbexplode3 = spawn script_model targetname "fbexplode3" local.fbexplode3 model "fx/fx_truck_explosion.tik" local.fbexplode3.origin = local.finalbomb3.origin + ( 0 -100 0 ) local.fbexplode3.angles = ( 0 -90 0 ) local.fbexplode3.scale = 1.75 local.fbexplode3 anim aaaa local.fbexplode3 notsolid local.fbexplode4 = spawn script_model targetname "fbexplode4" local.fbexplode4 model "fx/fx_truck_explosion.tik" local.fbexplode4.origin = local.finalbomb4.origin + ( 0 -100 0 ) local.fbexplode4.angles = ( 0 -90 0 ) local.fbexplode4.scale = 1.75 local.fbexplode4 anim aaaa local.fbexplode4 notsolid local.fbdebris1 = spawn script_model targetname "fbdebris1" local.fbdebris1 model "animate/explosion_bombwall.tik" local.fbdebris1.origin = ( 5145 -2534 -190 ) + ( 0 -100 0 ) local.fbdebris1.angles = ( 0 -90 0 ) local.fbdebris1 anim idle local.fbdebris1 notsolid local.fbdebris2 = spawn script_model targetname "fbdebris2" local.fbdebris2 model "animate/explosion_bombwall.tik" local.fbdebris2.origin = ( 5849 -2534 -190 ) + ( 0 -100 0 ) local.fbdebris2.angles = ( 0 -90 0 ) local.fbdebris2 anim idle local.fbdebris2 notsolid end //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // detonator calls this thread first. local.origin = local.finaldet.origin. // local.pulsatingoff = 0,1,2 (0 = keep on and show, 1 = hide after blowing up, 2 = pulsate for 8 seconds, then hide. show bombs and reset detonator when local.offtime ends. // bombfield local.origin local.fusetime local.offtime local.minedamageradius local.pulsatingoff: local.fusespark_long = spawn script_model // this fuse travels straight down the range from the detonator. local.fusespark_long model "emitters/welding_spark.tik" local.fusespark_long.origin = local.origin local.fusespark_long.scale = 1.5 local.fusefire_long = spawn script_model local.fusefire_long model "emitters/firegood.tik" local.fusefire_long.origin = local.origin local.fusefire_long.scale = 0.75 local.fusefire_long glue local.fusespark_long thread mines local.fusetime local.minedamageradius // start mines thread before "waitmove", so delay time begins counting while fuse is still moving. local.fusespark_long loopsound welding_torch local.fusespark_long time local.fusetime local.fusespark_long moveto ( local.fusespark_long.origin + ( 0 -2658 0 ) ) local.fusespark_long waitmove local.random = randomint(3) // make a random player_fire wav sound when fuse reaches its destination if(local.random == 0) { local.fusespark_long playsound sparkup1 } if(local.random == 1) { local.fusespark_long playsound sparkup2 } if(local.random == 2) { local.fusespark_long playsound sparkup3 } local.fusespark_long stoploopsound local.fusespark_long remove local.fusefire_long remove waitthread finalbombs local.offtime 430 local.pulsatingoff // keep script in bombfield thread until "finalbombs" is done. end //////////////////////////////////////////////////////////////////////// mines local.fusetime local.damageradius: local.time = (local.fusetime * 919.000) / 2658.000 wait local.time $ffminebomb1 playsound explode_mine_large radiusdamage $ffminebomb1.origin 300 local.damageradius // 1st row, 1 bomb waitframe $ffminebomb1 anim start local.time = (local.fusetime * 510.000) / 2658.000 local.rdec1 = (randomint(200) / 1000.000) // randomize a decimal delay time between left and right mines blowing up, per row. local.randomm1 = randomint(2) // randomize which mines (left or right) blow up first, per row. if(local.randomm1 == 0) { wait (local.time - local.rdec1) $ffminebomb2 playsound explode_mine_large radiusdamage $ffminebomb2.origin 300 local.damageradius // 2nd row, 2 bombs waitframe $ffminebomb2 anim start wait local.rdec1 $ffminebomb3 playsound explode_mine_large radiusdamage $ffminebomb3.origin 300 local.damageradius waitframe $ffminebomb3 anim start } if(local.randomm1 == 1) { wait (local.time - local.rdec1) $ffminebomb3 playsound explode_mine_large radiusdamage $ffminebomb3.origin 300 local.damageradius waitframe $ffminebomb3 anim start wait local.rdec1 $ffminebomb2 playsound explode_mine_large radiusdamage $ffminebomb2.origin 300 local.damageradius waitframe $ffminebomb2 anim start } local.rdec2 = (randomint(200) / 1000.000) local.randomm2 = randomint(2) if(local.randomm2 == 0) { wait (local.time - local.rdec2) $ffminebomb4 playsound explode_mine_large radiusdamage $ffminebomb4.origin 300 local.damageradius // 3rd row, 2 bombs waitframe $ffminebomb4 anim start wait local.rdec2 $ffminebomb5 playsound explode_mine_large radiusdamage $ffminebomb5.origin 300 local.damageradius waitframe $ffminebomb5 anim start } if(local.randomm2 == 1) { wait (local.time - local.rdec2) $ffminebomb5 playsound explode_mine_large radiusdamage $ffminebomb5.origin 300 local.damageradius waitframe $ffminebomb5 anim start wait local.rdec2 $ffminebomb4 playsound explode_mine_large radiusdamage $ffminebomb4.origin 300 local.damageradius waitframe $ffminebomb4 anim start } wait local.time $ffminebomb6 playsound explode_mine_large radiusdamage $ffminebomb6.origin 300 local.damageradius // 4th row, 1 bomb, closest to firing range windows. waitframe $ffminebomb6 anim start end //////////////////////////////////////////////////////////////////////// finalbombs local.offtime local.damageradius local.pulsatingoff: local.rdec0 = randomint(25) / 10.0 // randomize the time delay after last mine blows up, before finalbombs blow up. wait local.rdec0 $fbexplode1 anim idle $fbexplode2 anim idle $fbexplode3 anim idle $fbexplode4 anim idle $fbdebris1 anim start $fbdebris2 anim start local.random1 = randomint(4) if(local.random1 == 0) { $fbdebris1 playsound explode_building_large1 $fbdebris2 playsound explode_building_large1 } if(local.random1 == 1) { $fbdebris1 playsound explode_building_large2 $fbdebris2 playsound explode_building_large2 } if(local.random1 == 2) { $fbdebris1 playsound explode_building_large3 $fbdebris2 playsound explode_building_large3 } if(local.random1 == 3) { $fbdebris1 playsound explode_building_large4 $fbdebris2 playsound explode_building_large4 } if(local.pulsatingoff == 1) { $finalbomb1 hide $finalbomb2 hide $finalbomb3 hide $finalbomb4 hide } waitframe $fbexplode1 anim aaaa $fbexplode2 anim aaaa $fbexplode3 anim aaaa $fbexplode4 anim aaaa radiusdamage $finalbomb1.origin 300 local.damageradius radiusdamage $finalbomb2.origin 300 local.damageradius radiusdamage $finalbomb3.origin 300 local.damageradius radiusdamage $finalbomb4.origin 300 local.damageradius $finalbomb1.model = "items/pulse_explosive2.tik" $finalbomb2.model = "items/pulse_explosive2.tik" $finalbomb3.model = "items/pulse_explosive2.tik" $finalbomb4.model = "items/pulse_explosive2.tik" if(local.pulsatingoff != 2) { wait local.offtime } // default if(local.pulsatingoff == 2) { wait 8 $finalbomb1 hide $finalbomb2 hide $finalbomb3 hide $finalbomb4 hide wait (local.offtime - 8) } $finalbomb1 show $finalbomb2 show $finalbomb3 show $finalbomb4 show $finalbomb1.model = "items/explosive2.tik" $finalbomb2.model = "items/explosive2.tik" $finalbomb3.model = "items/explosive2.tik" $finalbomb4.model = "items/explosive2.tik" $fbdebris1 anim stop $fbdebris2 anim stop end