main local.roketorg local.launchorg local.launchang local.distance local.particletime local.exploscale: local.launcher = waitthread make_launcher local.launchorg local.launchang local.launcher.rocket = waitthread make_firework local.roketorg local.launcher.rocket.distance = local.distance local.launcher.rocket.particletime = local.particletime local.launcher.rocket.exploscale = local.exploscale thread prepare end prepare: level.axisfireworks = 0 level.alliesfireworks = 0 exec global/night.scr end make_firework local.origin: local.firework = spawn script_model local.firework model "static/v2.tik" local.firework.origin = local.origin local.firework.angles = ( 0 90 0 ) local.firework light 1 .6 1 100 local.firework notsolid local.firework.scale = .2 local.firework rotatey 50 local.firework speed 500 local.firework.save_origin = local.origin end local.firework make_launcher local.origin local.angle: local.launcher = spawn trigger_use local.launcher.origin = local.origin local.launcher setsize ( -50 -50 -20 ) ( 50 50 20 ) local.launcher light 1 .8 .6 100 local.launcher setthread Launch local.launcher message "*** You launched a firework. ***" local.launcher.switch = spawn script_model local.launcher.switch model "animate/alarmswitch.tik" local.launcher.switch.origin = local.origin local.launcher.switch.angles = local.angle end local.launcher Launch: self nottriggerable local.player = parm.other self.switch anim turnon self.switch playsound alarm_switch // Launchpad local.coron3 = spawn script_model model "fx/corona_red.tik" scale "0.5" local.coron3.origin = self.rocket.origin + ( -4 0 0 ) local.coron3 thread blink // Trailing smoke self.rocket.fire = spawn script_model model "emitters/pipe_steam.tik" scale "2.0" //"static/corona_orange.tik" scale "1.0" self.rocket.fire.origin = self.rocket.origin self.rocket.fire.angles = ( -90 0 0 ) self.rocket.fire bind self.rocket // Fire up and lift off self.rocket playsound fwork_launch self.rocket light 1 .8 .6 300 self.rocket moveup self.rocket.distance self.rocket waitmove // BOOM!!! waitthread explode_rocket self.rocket waitthread get_score local.player.dmteam waitthread update_hud // Put back self.rocket.origin = self.rocket.save_origin wait 3 self.rocket show self.rocket rotatey 50 self.rocket light 1 .6 1 100 self triggerable self.switch anim turnoff local.coron3 remove end explode_rocket local.rocket: local.fx = waitthread make_fworks local.rocket.origin 10 local.explosion = spawn script_model local.explosion model "fx/fx_truck_explosion.tik" local.explosion.origin = local.rocket.origin local.explosion notsolid local.explosion.scale = local.rocket.exploscale local.explosion anim idle local.rocket.fire unbind local.rocket local.rocket.fire remove local.rocket hide // Start Firework Anim wait .1 local.explosion remove waitthread firefx local.fx local.fx[1] playsound fwork_explo // Light up the sky local.fx[1] light 1 .8 .6 4500 wait .1 local.fx[1] light 0 0 0 0 wait local.rocket.particletime waitthread removefx local.fx end make_fworks local.origin local.count: local.fworkary = NIL for(local.c = 1; local.c<=local.count;local.c++) { local.typeint = randomint(2)+1 if(local.typeint == 1) { local.fworkary[local.c] = waitthread spawn local.origin "fx/corona_red.tik" 5 } else { local.fworkary[local.c] = waitthread spawn local.origin "static/corona_orange.tik" 3.5 } local.fworkary[local.c].angles = ( 0 90 0 ) } end local.fworkary firefx local.fx: for(local.i = 1; local.i <= local.fx.size; local.i++) { local.fx[local.i] show local.fx[local.i] physics_on local.fx[local.i].velocity = waitthread get_velocity local.fx[local.i] local.fx[local.i] light 1 (randomfloat 50 / 100) 0 600 } end removefx local.fx: for(local.i = 1; local.i <= local.fx.size; local.i++) { local.fx remove } end get_velocity local.fwork: local.destination = randomint (7)+1 switch (local.destination) { case 1: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * -240 + local.fwork.upvector * 800 break case 2: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * -160 + local.fwork.upvector * 800 break case 3: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * -80 + local.fwork.upvector * 800 break case 4: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * 0 + local.fwork.upvector * 800 break case 5: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * 80 + local.fwork.upvector * 800 break case 6: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * 160 + local.fwork.upvector * 800 break case 7: local.velocity = local.fwork.forwardvector * -300 + local.fwork.leftvector * 240 + local.fwork.upvector * 800 break } end local.velocity //=========================================================== // Just to clean everything up spawn local.origin local.model local.scale local.tgname: local.spawn = spawn script_model model local.model local.spawn.origin = local.origin local.spawn scale local.scale local.spawn notsolid local.spawn hide local.spawn targetname local.tgname end local.spawn blink: while(self != NULL) { if(self) self hide wait .5 if(self) self show } end