// Complementary script that runs immediately after the tank explodes in training.map script, in the "obj6b" thread. // Original tank explosion model changed, scaled boosted, angle fixed. Truck explosions and mine explosions at the explosive boxes. // Mine explosions at the back of the tank. Gas barrel explosions at the barrel racks, and black smoke emitting afterwards. // In training script, targetnames are individually called, but all explosions can be tested by running "tankexplosions.scr::explodeall" // Note: if they do not explode, you must remove all objects first with "tankexplosions.scr::removeemitters 1 1", then run "tankexplosions.scr::main". main: // run before "level waittill spawn"; spawns in all tankexplosions objects when training map loads. if(level.tankexplosions_objects == 1) { iprintlnbold ("Error: Must run and finish 'tankexplosions.scr::removeemitters 1 1' first before running 'explosiveboxes.scr::main'.") } if(level.tankexplosions_objects != 1) { local.exploent1 = spawn script_model targetname "tankexplosion0a" local.exploent1 model "models/emitters/explosion_mine.tik" local.exploent1.origin = $explosive_on.origin local.exploent1.angles = ( 0 -90 0 ) local.exploent1 anim idle local.exploent1 notsolid local.exploent2 = spawn script_model targetname "tankexplosion0b" local.exploent2 model "models/emitters/mortar_higgins.tik" local.exploent2.origin = ( 724 -2684 -396 ) //$tank.origin local.exploent2.angles = $tank.angles + ( 260 0 0 ) //( 0 -90 0 ) + ( 260 0 0 ) local.exploent2.scale = 1.5 local.exploent2 anim idle local.exploent2 notsolid local.exploent3 = spawn script_model targetname "tankexplosion0c" local.exploent3 model "fx/fx_truck_explosion.tik" local.exploent3.origin = $explosive_on.origin local.exploent3.angles = ( 0 -90 0 ) local.exploent3 anim aaaa local.exploent3 notsolid if(level.tankexplosions_objects != 2) { local.ent2 = spawn script_model targetname "tankdestroyed0b" // these 3 fancyfire objects are never removed local.ent2 model "emitters/fancyfire.tik" local.ent2.origin = ( 724 -2684 -396 ) + ( 0 0 20 ) local.ent2.angles = ( 0 -90 0 ) local.ent2 anim stop local.ent3 = spawn script_model targetname "tankdestroyed0c" local.ent3 model "emitters/fancyfire.tik" local.ent3.origin = ( 724 -2684 -396 ) + ( 0 -75 20 ) local.ent3.angles = ( 0 -90 0 ) local.ent3.scale = 2.0 local.ent3 anim stop local.ent4 = spawn script_model targetname "tankdestroyed0d" local.ent4 model "emitters/fancyfire.tik" local.ent4.origin = ( 724 -2684 -396 ) + ( 0 75 20 ) local.ent4.angles = ( 0 -90 0 ) local.ent4.scale = 2.0 local.ent4 anim stop } if(level.tankexplosions_objects == 2) { $tankdestroyed0b anim stop $tankdestroyed0c anim stop $tankdestroyed0d anim stop } local.m3 = spawn script_model targetname "m3replace" //replace the m3 halftrack destroyed by radiusdamage local.m3 model "vehicles/m3.tik" local.m3.origin = ( 701 -3360 -390 ) local.m3.angles = ( 0 87 0 ) local.m3.health = 9999999 local.m3.scale = 1 local.m3 hide local.exploextra1 = spawn script_model targetname "tankexplosion11a" local.exploextra1 model "fx/fx_truck_explosion.tik" local.exploextra1.origin = ( 948 -2066 -334 ) //$expbox1.origin local.exploextra1.scale = 3 local.exploextra1 anim aaaa local.exploextra1 notsolid local.exploextra11 = spawn script_model targetname "tankexplosion11b" local.exploextra11 model "animate/fx_explosion_mine.tik" local.exploextra11.origin = ( 948 -2066 -334 ) //$expbox1.origin local.exploextra11 anim idle local.exploextra11 notsolid local.exploextra2 = spawn script_model targetname "tankexplosion12a" local.exploextra2 model "fx/fx_truck_explosion.tik" local.exploextra2.origin = ( -165 -2057.5 -334 ) //$expbox4.origin local.exploextra2.scale = 3 local.exploextra2 anim aaaa local.exploextra2 notsolid local.exploextra22 = spawn script_model targetname "tankexplosion12b" local.exploextra22 model "animate/fx_explosion_mine.tik" local.exploextra22.origin = ( -165 -2057.5 -334 ) //$expbox4.origin local.exploextra22 anim idle local.exploextra22 notsolid local.exploextra3 = spawn script_model targetname "tankexplosion13a" local.exploextra3 model "fx/fx_truck_explosion.tik" local.exploextra3.origin = ( 450 -3534.5 -334 ) //$expbox7.origin local.exploextra3.scale = 3 local.exploextra3 anim aaaa local.exploextra3 notsolid local.exploextra33 = spawn script_model targetname "tankexplosion13b" local.exploextra33 model "animate/fx_explosion_mine.tik" local.exploextra33.origin = ( 450 -3534.5 -334 ) //$expbox7.origin local.exploextra33 anim idle local.exploextra33 notsolid local.exploextra4 = spawn script_model targetname "tankexplosion21a" local.exploextra4 model "fx/barrel_gas_destroyed.tik" local.exploextra4.origin = ( -73 -3242 -385 ) local.exploextra4.scale = 2 local.exploextra4 anim dummy local.exploextra4 notsolid local.exploextra44 = spawn script_model targetname "tankexplosion21b" local.exploextra44 model "fx/barrel_water_destroyed.tik" local.exploextra44.origin = ( -31 -3350 -264 ) local.exploextra44.scale = 2 local.exploextra44 anim aaaa local.exploextra44 notsolid local.exploextra444 = spawn script_model targetname "tankexplosion22a" local.exploextra444 model "fx/barrel_gas_destroyed.tik" local.exploextra444.origin = ( 126 -3415 -387 ) local.exploextra444.scale = 2 local.exploextra444 anim dummy local.exploextra444 notsolid local.exploextra4444 = spawn script_model targetname "tankexplosion22b" local.exploextra4444 model "fx/barrel_water_destroyed.tik" local.exploextra4444.origin = ( 178 -3251 -264 ) local.exploextra4444.scale = 2 local.exploextra4444 anim aaaa local.exploextra4444 notsolid local.smokeent1 = spawn script_model targetname "tankexplosion_smoke1" local.smokeent1 model "emitters/firesmoke.tik" local.smokeent1.origin = ( -31 -3350 -264 ) local.smokeent1.angles = ( -90 0 0 ) local.smokeent1 anim stop local.smokeent2 = spawn script_model targetname "tankexplosion_smoke2" local.smokeent2 model "emitters/firesmoke.tik" local.smokeent2.origin = ( 178 -3251 -264 ) local.smokeent2.angles = ( -90 0 0 ) local.smokeent2 anim stop level.tankexplosions_objects = 1 } end //////////////////////////////////////////////////////////////////////// removeemitters local.stoptankfire local.removetankfire: // remove all emitters, as well as stopping tank fire or removing it. $tankexplosion0a remove $tankexplosion0b remove $tankexplosion0c remove $tankexplosion11a remove $tankexplosion11b remove $tankexplosion12a remove $tankexplosion12b remove $tankexplosion13a remove $tankexplosion13b remove $tankexplosion21a remove $tankexplosion21b remove $tankexplosion22a remove $tankexplosion22b remove $tankexplosion_smoke1 remove $tankexplosion_smoke2 remove if(local.stoptankfire == 1) { $tankdestroyed0b anim stop $tankdestroyed0c anim stop $tankdestroyed0d anim stop level.tankexplosions_objects = 2 if(local.removetankfire == 1) { $tankdestroyed0b remove $tankdestroyed0c remove $tankdestroyed0d remove level.tankexplosions_objects = 0 } } end //////////////////////////////////////////////////////////////////////// explodeall local.time local.notankfireorsmoke: // explode all explosions and start black smoke near barrels. wait local.time if(local.notankfireorsmoke != 1) { $tankdestroyed0b anim start $tankdestroyed0b anim start $tankdestroyed0d anim start $tankexplosion_smoke1 anim start $tankexplosion_smoke2 anim start } $tankexplosion0a anim start $tankexplosion0b anim start $tankexplosion0c anim idle $tankexplosion11a anim idle $tankexplosion11b anim start $tankexplosion12a anim idle $tankexplosion12b anim start $tankexplosion13a anim idle $tankexplosion13b anim start $tankexplosion21a anim idle $tankexplosion21b anim idle $tankexplosion22a anim idle $tankexplosion22b anim idle end