// 24 max entities. main local.scale: local.bangalore1 = spawn script_model targetname "trenchbangalore1" local.bangalore1 model "animate/bangalore.tik" local.bangalore1.origin = ( -1492 -1038 -194.5 ) // closest to tank local.bangalore1.angles = ( 45 -90 0 ) local.bangalore1 notsolid local.bangalore2 = spawn script_model targetname "trenchbangalore2" local.bangalore2 model "animate/bangalore.tik" local.bangalore2.origin = ( -1870 -1038 -194.5 ) local.bangalore2.angles = ( 45 -90 0 ) local.bangalore2 notsolid local.bangalore3 = spawn script_model targetname "trenchbangalore3" local.bangalore3 model "animate/bangalore.tik" local.bangalore3.origin = ( -1607 -783 -196 ) local.bangalore3.angles = ( 45 -180 0 ) local.bangalore3 notsolid local.bangalore4 = spawn script_model targetname "trenchbangalore4" local.bangalore4 model "animate/bangalore.tik" local.bangalore4.origin = ( -1607 -115 -196 ) local.bangalore4.angles = ( 45 -180 0 ) local.bangalore4 notsolid local.bangalore5 = spawn script_model targetname "trenchbangalore5" local.bangalore5 model "animate/bangalore.tik" local.bangalore5.origin = ( -2128 195 -196 ) local.bangalore5.angles = ( 45 -95 0 ) local.bangalore5 notsolid local.bangalore6 = spawn script_model targetname "trenchbangalore6" local.bangalore6 model "animate/bangalore.tik" local.bangalore6.origin = ( -2767 230 -196 ) local.bangalore6.angles = ( 45 -90 0 ) local.bangalore6 notsolid local.bangalore7 = spawn script_model targetname "trenchbangalore7" local.bangalore7 model "animate/bangalore.tik" local.bangalore7.origin = ( -3142 165 -196 ) // closest to tents local.bangalore7.angles = ( 45 -180 0 ) local.bangalore7 notsolid local.bangalore8 = spawn script_model targetname "trenchbangalore8" local.bangalore8 model "animate/bangalore.tik" local.bangalore8.origin = ( -3142 -227 -196 ) local.bangalore8.angles = ( 45 -180 0 ) local.bangalore8 notsolid local.sin1 = (waitthread global/math.scr::sine local.bangalore1.angles[1]) * 50 local.cos1 = (waitthread global/math.scr::cosine local.bangalore1.angles[1]) * 50 local.sin2 = (waitthread global/math.scr::sine local.bangalore2.angles[1]) * 50 local.cos2 = (waitthread global/math.scr::cosine local.bangalore2.angles[1]) * 50 local.sin3 = (waitthread global/math.scr::sine local.bangalore3.angles[1]) * 50 local.cos3 = (waitthread global/math.scr::cosine local.bangalore3.angles[1]) * 50 local.sin4 = (waitthread global/math.scr::sine local.bangalore4.angles[1]) * 50 local.cos4 = (waitthread global/math.scr::cosine local.bangalore4.angles[1]) * 50 local.sin5 = (waitthread global/math.scr::sine local.bangalore5.angles[1]) * 50 local.cos5 = (waitthread global/math.scr::cosine local.bangalore5.angles[1]) * 50 local.sin6 = (waitthread global/math.scr::sine local.bangalore6.angles[1]) * 50 local.cos6 = (waitthread global/math.scr::cosine local.bangalore6.angles[1]) * 50 local.sin7 = (waitthread global/math.scr::sine local.bangalore7.angles[1]) * 50 local.cos7 = (waitthread global/math.scr::cosine local.bangalore7.angles[1]) * 50 local.sin8 = (waitthread global/math.scr::sine local.bangalore8.angles[1]) * 50 local.cos8 = (waitthread global/math.scr::cosine local.bangalore8.angles[1]) * 50 local.explosion1 = spawn script_model targetname "trenchexplode1" local.explosion1 model "fx/fx_truck_explosion.tik" local.explosion1.origin = local.bangalore1.origin + ( local.cos1 local.sin1 0 ) local.explosion1.angles = local.bangalore1.angles local.explosion1 notsolid local.explosion1.scale = local.scale local.explosion1 anim aaaa local.explosion2 = spawn script_model targetname "trenchexplode2" local.explosion2 model "fx/fx_truck_explosion.tik" local.explosion2.origin = local.bangalore2.origin + ( local.cos2 local.sin2 0 ) local.explosion2.angles = local.bangalore2.angles local.explosion2 notsolid local.explosion2.scale = local.scale local.explosion2 anim aaaa local.explosion3 = spawn script_model targetname "trenchexplode3" local.explosion3 model "fx/fx_truck_explosion.tik" local.explosion3.origin = local.bangalore3.origin + ( local.cos3 local.sin3 0 ) local.explosion3.angles = local.bangalore3.angles local.explosion3 notsolid local.explosion3.scale = local.scale local.explosion3 anim aaaa local.explosion4 = spawn script_model targetname "trenchexplode4" local.explosion4 model "fx/fx_truck_explosion.tik" local.explosion4.origin = local.bangalore4.origin + ( local.cos4 local.sin4 0 ) local.explosion4.angles = local.bangalore4.angles local.explosion4 notsolid local.explosion4.scale = local.scale local.explosion4 anim aaaa local.explosion5 = spawn script_model targetname "trenchexplode5" local.explosion5 model "fx/fx_truck_explosion.tik" local.explosion5.origin = local.bangalore5.origin + ( local.cos5 local.sin5 0 ) local.explosion5.angles = local.bangalore5.angles local.explosion5 notsolid local.explosion5.scale = local.scale local.explosion5 anim aaaa local.explosion6 = spawn script_model targetname "trenchexplode6" local.explosion6 model "fx/fx_truck_explosion.tik" local.explosion6.origin = local.bangalore6.origin + ( local.cos6 local.sin6 0 ) local.explosion6.angles = local.bangalore6.angles local.explosion6 notsolid local.explosion6.scale = local.scale local.explosion6 anim aaaa local.explosion7 = spawn script_model targetname "trenchexplode7" local.explosion7 model "fx/fx_truck_explosion.tik" local.explosion7.origin = local.bangalore7.origin + ( local.cos7 local.sin7 0 ) local.explosion7.angles = local.bangalore7.angles local.explosion7 notsolid local.explosion7.scale = local.scale local.explosion7 anim aaaa local.explosion8 = spawn script_model targetname "trenchexplode8" local.explosion8 model "fx/fx_truck_explosion.tik" local.explosion8.origin = local.bangalore8.origin + ( local.cos8 local.sin8 0 ) local.explosion8.angles = local.bangalore8.angles local.explosion8 notsolid local.explosion8.scale = local.scale local.explosion8 anim aaaa local.debris1 = spawn script_model targetname "trenchdebris1" local.debris1 model "emitters/mortar_dirt_nosound.tik" local.debris1.origin = local.bangalore1.origin + ( local.cos1 local.sin1 -107.5 ) local.debris1.angles = local.bangalore1.angles local.debris1 notsolid local.debris1 anim idle local.debris2 = spawn script_model targetname "trenchdebris2" local.debris2 model "emitters/mortar_dirt_nosound.tik" local.debris2.origin = local.bangalore2.origin + ( local.cos2 local.sin2 -107.5 ) local.debris2.angles = local.bangalore2.angles local.debris2 notsolid local.debris2 anim idle local.debris3 = spawn script_model targetname "trenchdebris3" local.debris3 model "emitters/mortar_dirt_nosound.tik" local.debris3.origin = local.bangalore3.origin + ( local.cos3 local.sin3 -107 ) local.debris3.angles = local.bangalore3.angles local.debris3 notsolid local.debris3 anim idle local.debris4 = spawn script_model targetname "trenchdebris4" local.debris4 model "emitters/mortar_dirt_nosound.tik" local.debris4.origin = local.bangalore4.origin + ( local.cos4 local.sin4 -95 ) local.debris4.angles = local.bangalore4.angles local.debris4 notsolid local.debris4 anim idle local.debris5 = spawn script_model targetname "trenchdebris5" local.debris5 model "emitters/mortar_dirt_nosound.tik" local.debris5.origin = local.bangalore5.origin + ( local.cos5 local.sin5 -104 ) local.debris5.angles = local.bangalore5.angles local.debris5 notsolid local.debris5 anim idle local.debris6 = spawn script_model targetname "trenchdebris6" local.debris6 model "emitters/mortar_dirt_nosound.tik" local.debris6.origin = local.bangalore6.origin + ( local.cos6 local.sin6 -85 ) local.debris6.angles = local.bangalore6.angles local.debris6 notsolid local.debris6 anim idle local.debris7 = spawn script_model targetname "trenchdebris7" local.debris7 model "emitters/mortar_dirt_nosound.tik" local.debris7.origin = local.bangalore7.origin + ( local.cos7 local.sin7 -123 ) local.debris7.angles = local.bangalore7.angles local.debris7 notsolid local.debris7 anim idle local.debris8 = spawn script_model targetname "trenchdebris8" local.debris8 model "emitters/mortar_dirt_nosound.tik" local.debris8.origin = local.bangalore8.origin + ( local.cos8 local.sin8 -123 ) local.debris8.angles = local.bangalore8.angles local.debris8 notsolid local.debris8 anim idle end //////////////////////////////////////////////////////////////////////// blowup local.name local.offtime local.damageradius local.pulsatingoff: $(trenchbangalore + local.name).model = "animate/bangalore_pulsating_ghosting.tik" $(trenchexplode + local.name) anim idle $(trenchdebris + local.name) anim start if(local.pulsatingoff == 1) { $(trenchbangalore + local.name) hide } radiusdamage $(trenchexplode + local.name).origin 300 local.damageradius local.random1 = randomint(2) if(local.random1 == 0) { $(trenchbangalore + local.name) playsound explode_wood_small1 } if(local.random1 == 1) { $(trenchbangalore + local.name) playsound explode_wood_small2 } waitframe //some emitters need to be turned back off immediately, otherwise player sees explosions again when going in/out of map bounds. $(trenchexplode + local.name) anim aaaa $(trenchbangalore + local.name) playsound explode_mine_large // this sounds better when it plays after "waitframe" if(local.pulsatingoff != 2) { wait local.offtime } // default if(local.pulsatingoff == 2) { wait 12 $(trenchbangalore + local.name) hide // pulsates until emitter is done, about 12 seconds. wait (local.offtime - 12) } $(trenchbangalore + local.name).model = "animate/bangalore.tik" $(trenchdebris + local.name) anim idle if(local.pulsatingoff == 1 || local.pulsatingoff == 2) { $(trenchbangalore + local.name) show } end