// 74 max entities. main local.origin: // initialize (spawn in) all field fire objects and damage triggers when map loads first. local.fire1 = spawn script_model targetname "fieldfire_1a" local.fire1 model "emitters/firefill.tik" local.fire1.origin = local.origin + ( 1056 -575 0 ) local.fire1.angles = ( 0 0 0 ) local.fire1.scale = 4 local.fire1 anim stop local.fire2 = spawn script_model targetname "fieldfire_1b" local.fire2 model "emitters/firefill.tik" local.fire2.origin = local.origin + ( 352 -575 0 ) local.fire2.angles = ( 0 0 0 ) local.fire2.scale = 4 local.fire2 anim stop local.fire3 = spawn script_model targetname "fieldfire_1c" local.fire3 model "emitters/firefill.tik" local.fire3.origin = local.origin + ( -352 -575 0 ) local.fire3.angles = ( 0 0 0 ) local.fire3.scale = 4 local.fire3 anim stop local.fire4 = spawn script_model targetname "fieldfire_1d" local.fire4 model "emitters/firefill.tik" local.fire4.origin = local.origin + ( -1056 -575 0 ) local.fire4.angles = ( 0 0 0 ) local.fire4.scale = 4 local.fire4 anim stop local.fire5 = spawn script_model targetname "fieldfire_2a" local.fire5 model "emitters/firefill.tik" local.fire5.origin = local.origin + ( 1056 -1150 0 ) local.fire5.angles = ( 0 0 0 ) local.fire5.scale = 4 local.fire5 anim stop local.fire6 = spawn script_model targetname "fieldfire_2b" local.fire6 model "emitters/firefill.tik" local.fire6.origin = local.origin + ( 352 -1150 0 ) local.fire6.angles = ( 0 0 0 ) local.fire6.scale = 4 local.fire6 anim stop local.fire7 = spawn script_model targetname "fieldfire_2c" local.fire7 model "emitters/firefill.tik" local.fire7.origin = local.origin + ( -352 -1150 0 ) local.fire7.angles = ( 0 0 0 ) local.fire7.scale = 4 local.fire7 anim stop local.fire8 = spawn script_model targetname "fieldfire_2d" local.fire8 model "emitters/firefill.tik" local.fire8.origin = local.origin + ( -1056 -1150 0 ) local.fire8.angles = ( 0 0 0 ) local.fire8.scale = 4 local.fire8 anim stop local.fire9 = spawn script_model targetname "fieldfire_3a" local.fire9 model "emitters/firefill.tik" local.fire9.origin = local.origin + ( 1056 -1725 0 ) local.fire9.angles = ( 0 0 0 ) local.fire9.scale = 4 local.fire9 anim stop local.fire10 = spawn script_model targetname "fieldfire_3b" local.fire10 model "emitters/firefill.tik" local.fire10.origin = local.origin + ( 352 -1725 0 ) local.fire10.angles = ( 0 0 0 ) local.fire10.scale = 4 local.fire10 anim stop local.fire11 = spawn script_model targetname "fieldfire_3c" local.fire11 model "emitters/firefill.tik" local.fire11.origin = local.origin + ( -352 -1725 0 ) local.fire11.angles = ( 0 0 0 ) local.fire11.scale = 4 local.fire11 anim stop local.fire12 = spawn script_model targetname "fieldfire_3d" local.fire12 model "emitters/firefill.tik" local.fire12.origin = local.origin + ( -1056 -1725 0 ) local.fire12.angles = ( 0 0 0 ) local.fire12.scale = 4 local.fire12 anim stop local.fire13 = spawn script_model targetname "fieldfire_4a" local.fire13 model "emitters/firefill.tik" local.fire13.origin = local.origin + ( 1056 -2300 0 ) local.fire13.angles = ( 0 0 0 ) local.fire13.scale = 4 local.fire13 anim stop local.fire14 = spawn script_model targetname "fieldfire_4b" local.fire14 model "emitters/firefill.tik" local.fire14.origin = local.origin + ( 352 -2300 0 ) local.fire14.angles = ( 0 0 0 ) local.fire14.scale = 4 local.fire14 anim stop local.fire15 = spawn script_model targetname "fieldfire_4c" local.fire15 model "emitters/firefill.tik" local.fire15.origin = local.origin + ( -352 -2300 0 ) local.fire15.angles = ( 0 0 0 ) local.fire15.scale = 4 local.fire15 anim stop local.fire16 = spawn script_model targetname "fieldfire_4d" local.fire16 model "emitters/firefill.tik" local.fire16.origin = local.origin + ( -1056 -2300 0 ) local.fire16.angles = ( 0 0 0 ) local.fire16.scale = 4 local.fire16 anim stop local.fire17 = spawn script_model targetname "fieldfire_5a" local.fire17 model "emitters/firefill.tik" local.fire17.origin = local.origin + ( 1056 -2875 0 ) local.fire17.angles = ( 0 0 0 ) local.fire17.scale = 4 local.fire17 anim stop local.fire18 = spawn script_model targetname "fieldfire_5b" local.fire18 model "emitters/firefill.tik" local.fire18.origin = local.origin + ( 352 -2875 0 ) local.fire18.angles = ( 0 0 0 ) local.fire18.scale = 4 local.fire18 anim stop local.fire19 = spawn script_model targetname "fieldfire_5c" local.fire19 model "emitters/firefill.tik" local.fire19.origin = local.origin + ( -352 -2875 0 ) local.fire19.angles = ( 0 0 0 ) local.fire19.scale = 4 local.fire19 anim stop local.fire20 = spawn script_model targetname "fieldfire_5d" local.fire20 model "emitters/firefill.tik" local.fire20.origin = local.origin + ( -1056 -2875 0 ) local.fire20.angles = ( 0 0 0 ) local.fire20.scale = 4 local.fire20 anim stop local.fire21 = spawn script_model targetname "fieldfire_6a" local.fire21 model "emitters/firefill.tik" local.fire21.origin = local.origin + ( 1056 -3450 0 ) local.fire21.angles = ( 0 0 0 ) local.fire21.scale = 4 local.fire21 anim stop local.fire22 = spawn script_model targetname "fieldfire_6b" local.fire22 model "emitters/firefill.tik" local.fire22.origin = local.origin + ( 352 -3450 0 ) local.fire22.angles = ( 0 0 0 ) local.fire22.scale = 4 local.fire22 anim stop local.fire23 = spawn script_model targetname "fieldfire_6c" local.fire23 model "emitters/firefill.tik" local.fire23.origin = local.origin + ( -352 -3450 0 ) local.fire23.angles = ( 0 0 0 ) local.fire23.scale = 4 local.fire23 anim stop local.fire24 = spawn script_model targetname "fieldfire_6d" local.fire24 model "emitters/firefill.tik" local.fire24.origin = local.origin + ( -1056 -3450 0 ) local.fire24.angles = ( 0 0 0 ) local.fire24.scale = 4 local.fire24 anim stop local.fire25 = spawn script_model targetname "fieldfire_7a" local.fire25 model "emitters/firefill.tik" local.fire25.origin = local.origin + ( 1056 -4025 0 ) local.fire25.angles = ( 0 0 0 ) local.fire25.scale = 4 local.fire25 anim stop local.fire26 = spawn script_model targetname "fieldfire_7b" local.fire26 model "emitters/firefill.tik" local.fire26.origin = local.origin + ( 352 -4025 0 ) local.fire26.angles = ( 0 0 0 ) local.fire26.scale = 4 local.fire26 anim stop local.fire27 = spawn script_model targetname "fieldfire_7c" local.fire27 model "emitters/firefill.tik" local.fire27.origin = local.origin + ( -352 -4025 0 ) local.fire27.angles = ( 0 0 0 ) local.fire27.scale = 4 local.fire27 anim stop local.fire28 = spawn script_model targetname "fieldfire_7d" local.fire28 model "emitters/firefill.tik" local.fire28.origin = local.origin + ( -1056 -4025 0 ) local.fire28.angles = ( 0 0 0 ) local.fire28.scale = 4 local.fire28 anim stop local.fire29 = spawn script_model targetname "fieldfire_8a" local.fire29 model "emitters/firefill.tik" local.fire29.origin = local.origin + ( 1056 -4600 0 ) local.fire29.angles = ( 0 0 0 ) local.fire29.scale = 4 local.fire29 anim stop local.fire30 = spawn script_model targetname "fieldfire_8b" local.fire30 model "emitters/firefill.tik" local.fire30.origin = local.origin + ( 352 -4600 0 ) local.fire30.angles = ( 0 0 0 ) local.fire30.scale = 4 local.fire30 anim stop local.fire31 = spawn script_model targetname "fieldfire_8c" local.fire31 model "emitters/firefill.tik" local.fire31.origin = local.origin + ( -352 -4600 0 ) local.fire31.angles = ( 0 0 0 ) local.fire31.scale = 4 local.fire31 anim stop local.fire32 = spawn script_model targetname "fieldfire_8d" local.fire32 model "emitters/firefill.tik" local.fire32.origin = local.origin + ( -1056 -4600 0 ) local.fire32.angles = ( 0 0 0 ) local.fire32.scale = 4 local.fire32 anim stop local.firetrig1 = spawn trigger_multiple targetname "ffiretrig_1a" local.firetrig1.origin = $fieldfire_1a.origin // local.fire1.origin local.firetrig1 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig1 setthread firepain local.firetrig1 nottriggerable local.firetrig2 = spawn trigger_multiple targetname "ffiretrig_1b" local.firetrig2.origin = $fieldfire_1b.origin local.firetrig2 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig2 setthread firepain local.firetrig2 nottriggerable local.firetrig3 = spawn trigger_multiple targetname "ffiretrig_1c" local.firetrig3.origin = $fieldfire_1c.origin local.firetrig3 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig3 setthread firepain local.firetrig3 nottriggerable local.firetrig4 = spawn trigger_multiple targetname "ffiretrig_1d" local.firetrig4.origin = $fieldfire_1d.origin local.firetrig4 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig4 setthread firepain local.firetrig4 nottriggerable local.firetrig5 = spawn trigger_multiple targetname "ffiretrig_2a" local.firetrig5.origin = $fieldfire_2a.origin // local.fire5.origin local.firetrig5 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig5 setthread firepain local.firetrig5 nottriggerable local.firetrig6 = spawn trigger_multiple targetname "ffiretrig_2b" local.firetrig6.origin = $fieldfire_2b.origin local.firetrig6 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig6 setthread firepain local.firetrig6 nottriggerable local.firetrig7 = spawn trigger_multiple targetname "ffiretrig_2c" local.firetrig7.origin = $fieldfire_2c.origin local.firetrig7 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig7 setthread firepain local.firetrig7 nottriggerable local.firetrig8 = spawn trigger_multiple targetname "ffiretrig_2d" local.firetrig8.origin = $fieldfire_2d.origin local.firetrig8 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig8 setthread firepain local.firetrig8 nottriggerable local.firetrig9 = spawn trigger_multiple targetname "ffiretrig_3a" local.firetrig9.origin = $fieldfire_3a.origin // local.fire9.origin local.firetrig9 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig9 setthread firepain local.firetrig9 nottriggerable local.firetrig10 = spawn trigger_multiple targetname "ffiretrig_3b" local.firetrig10.origin = $fieldfire_3b.origin local.firetrig10 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig10 setthread firepain local.firetrig10 nottriggerable local.firetrig11 = spawn trigger_multiple targetname "ffiretrig_3c" local.firetrig11.origin = $fieldfire_3c.origin local.firetrig11 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig11 setthread firepain local.firetrig11 nottriggerable local.firetrig12 = spawn trigger_multiple targetname "ffiretrig_3d" local.firetrig12.origin = $fieldfire_3d.origin local.firetrig12 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig12 setthread firepain local.firetrig12 nottriggerable local.firetrig13 = spawn trigger_multiple targetname "ffiretrig_4a" local.firetrig13.origin = $fieldfire_4a.origin // local.fire13.origin local.firetrig13 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig13 setthread firepain local.firetrig13 nottriggerable local.firetrig14 = spawn trigger_multiple targetname "ffiretrig_4b" local.firetrig14.origin = $fieldfire_4b.origin local.firetrig14 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig14 setthread firepain local.firetrig14 nottriggerable local.firetrig15 = spawn trigger_multiple targetname "ffiretrig_4c" local.firetrig15.origin = $fieldfire_4c.origin local.firetrig15 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig15 setthread firepain local.firetrig15 nottriggerable local.firetrig16 = spawn trigger_multiple targetname "ffiretrig_4d" local.firetrig16.origin = $fieldfire_4d.origin local.firetrig16 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig16 setthread firepain local.firetrig16 nottriggerable local.firetrig17 = spawn trigger_multiple targetname "ffiretrig_5a" local.firetrig17.origin = $fieldfire_5a.origin // local.fire17.origin local.firetrig17 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig17 setthread firepain local.firetrig17 nottriggerable local.firetrig18 = spawn trigger_multiple targetname "ffiretrig_5b" local.firetrig18.origin = $fieldfire_5b.origin local.firetrig18 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig18 setthread firepain local.firetrig18 nottriggerable local.firetrig19 = spawn trigger_multiple targetname "ffiretrig_5c" local.firetrig19.origin = $fieldfire_5c.origin local.firetrig19 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig19 setthread firepain local.firetrig19 nottriggerable local.firetrig20 = spawn trigger_multiple targetname "ffiretrig_5d" local.firetrig20.origin = $fieldfire_5d.origin local.firetrig20 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig20 setthread firepain local.firetrig20 nottriggerable local.firetrig21 = spawn trigger_multiple targetname "ffiretrig_6a" local.firetrig21.origin = $fieldfire_6a.origin // local.fire21.origin local.firetrig21 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig21 setthread firepain local.firetrig21 nottriggerable local.firetrig22 = spawn trigger_multiple targetname "ffiretrig_6b" local.firetrig22.origin = $fieldfire_6b.origin local.firetrig22 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig22 setthread firepain local.firetrig22 nottriggerable local.firetrig23 = spawn trigger_multiple targetname "ffiretrig_6c" local.firetrig23.origin = $fieldfire_6c.origin local.firetrig23 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig23 setthread firepain local.firetrig23 nottriggerable local.firetrig24 = spawn trigger_multiple targetname "ffiretrig_6d" local.firetrig24.origin = $fieldfire_6d.origin local.firetrig24 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig24 setthread firepain local.firetrig24 nottriggerable local.firetrig25 = spawn trigger_multiple targetname "ffiretrig_7a" local.firetrig25.origin = $fieldfire_7a.origin // local.fire25.origin local.firetrig25 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig25 setthread firepain local.firetrig25 nottriggerable local.firetrig26 = spawn trigger_multiple targetname "ffiretrig_7b" local.firetrig26.origin = $fieldfire_7b.origin local.firetrig26 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig26 setthread firepain local.firetrig26 nottriggerable local.firetrig27 = spawn trigger_multiple targetname "ffiretrig_7c" local.firetrig27.origin = $fieldfire_7c.origin local.firetrig27 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig27 setthread firepain local.firetrig27 nottriggerable local.firetrig28 = spawn trigger_multiple targetname "ffiretrig_7d" local.firetrig28.origin = $fieldfire_7d.origin local.firetrig28 setsize ( -360 -360 -20 ) ( 360 360 400 ) local.firetrig28 setthread firepain local.firetrig28 nottriggerable local.firetrig29 = spawn trigger_multiple targetname "ffiretrig_8a" local.firetrig29.origin = $fieldfire_8a.origin // local.fire29.origin local.firetrig29 setsize ( -360 -272 -20 ) ( 360 360 400 ) local.firetrig29 setthread firepain local.firetrig29 nottriggerable local.firetrig30 = spawn trigger_multiple targetname "ffiretrig_8b" local.firetrig30.origin = $fieldfire_8b.origin local.firetrig30 setsize ( -360 -272 -20 ) ( 360 360 400 ) local.firetrig30 setthread firepain local.firetrig30 nottriggerable local.firetrig31 = spawn trigger_multiple targetname "ffiretrig_8c" local.firetrig31.origin = $fieldfire_8c.origin local.firetrig31 setsize ( -360 -272 -20 ) ( 360 360 400 ) local.firetrig31 setthread firepain local.firetrig31 nottriggerable local.firetrig32 = spawn trigger_multiple targetname "ffiretrig_8d" local.firetrig32.origin = $fieldfire_8d.origin local.firetrig32 setsize ( -360 -272 -20 ) ( 360 360 400 ) local.firetrig32 setthread firepain local.firetrig32 nottriggerable local.firetrig33 = spawn trigger_multiple targetname "ffiretrigedge_a" local.firetrig33.origin = $fieldfire_8a.origin + ( 0 -267 0 ) local.firetrig33 setsize ( -360 -125 -20 ) ( 360 0 400 ) //-2615 -2472 -2200 local.firetrig33 setthread firepainedge local.firetrig33 nottriggerable local.firetrig34 = spawn trigger_multiple targetname "ffiretrigedge_b" local.firetrig34.origin = $fieldfire_8b.origin + ( 0 -267 0 ) local.firetrig34 setsize ( -360 -125 -20 ) ( 360 0 400 ) //-2615 -2472 -2200 local.firetrig34 setthread firepainedge local.firetrig34 nottriggerable local.firetrig35 = spawn trigger_multiple targetname "ffiretrigedge_c" local.firetrig35.origin = $fieldfire_8c.origin + ( 0 -267 0 ) local.firetrig35 setsize ( -360 -125 -20 ) ( 360 0 400 ) //-2615 -2472 -2200 local.firetrig35 setthread firepainedge local.firetrig35 nottriggerable local.firetrig36 = spawn trigger_multiple targetname "ffiretrigedge_d" local.firetrig36.origin = $fieldfire_8d.origin + ( 0 -267 0 ) local.firetrig36 setsize ( -360 -125 -20 ) ( 360 0 400 ) //-2615 -2472 -2200 local.firetrig36 setthread firepainedge local.firetrig36 nottriggerable end //////////////////////////////////////////////////////////////////////// firepain: // kills the player in 2 seconds. hurts player 4 times per second local.player = parm.other local.player volumedamage 12.5 waitframe end firepainedge: // kills the player in 5 seconds. local.player = parm.other local.player volumedamage 5 waitframe end //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// fusespark_downrange local.name local.origin local.fusetime local.firedelay: // this fuse travels straight down the range from the detonator. local.fusespark_long = spawn script_model 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 if(local.name == "mid") { thread fusespark_sideways left local.origin local.fusetime local.firedelay // begin left adjacent fuse traveling to other ranges thread fusespark_sideways right local.origin local.fusetime local.firedelay // begin right adjacent fuse } if(local.name == "left") { thread fusespark_sideways right local.origin local.fusetime local.firedelay // begin right adjacent fuse thread fusespark_sideways rightmost local.origin local.fusetime local.firedelay // begin rightmost fuse after waiting for adjacent right fuse } if(local.name == "right") { thread fusespark_sideways left local.origin local.fusetime local.firedelay // begin left adjacent fuse thread fusespark_sideways leftmost local.origin local.fusetime local.firedelay // begin leftmost fuse after waiting for adjacent left fuse } local.fusespark_long loopsound welding_torch local.fusespark_long time local.fusetime local.fusespark_long moveto ( local.fusespark_long.origin + ( 0 -4800 0 ) ) local.fusespark_long waitmove local.random1 = randomint(3) // make a random player_fire wav sound when fuse reaches its destination if(local.random1 == 0) { local.fusespark_long playsound sparkup1 } if(local.random1 == 1) { local.fusespark_long playsound sparkup2 } if(local.random1 == 2) { local.fusespark_long playsound sparkup3 } local.fusespark_long stoploopsound local.fusespark_long remove local.fusefire_long remove end fusespark_sideways local.name local.origin local.fusetime local.firedelay: // these two fuses travel sideways to other detonators, before traveling down the other ranges. local.fusespark_side = spawn script_model local.fusespark_side model "emitters/welding_spark.tik" local.fusespark_side.origin = local.origin local.fusespark_side.scale = 1.5 local.fusefire_side = spawn script_model local.fusefire_side model "emitters/firegood.tik" local.fusefire_side.origin = local.origin local.fusefire_side.scale = 0.75 local.fusefire_side glue local.fusespark_side local.fusespark_side loopsound welding_torch local.fusespark_side time local.firedelay // short time for fuse to travel between ranges if(local.name == "leftmost" || local.name == "rightmost") { local.fusespark_side anim stop // keep furthest 3rd fuse off until 2nd fuse begins traveling down middle range. local.fusefire_side anim stop } if(local.name == "left" || local.name == "leftmost") { local.fusespark_side moveto ( local.fusespark_side.origin + ( 704 0 0 ) ) } if(local.name == "right" || local.name == "rightmost") { local.fusespark_side moveto ( local.fusespark_side.origin + ( -704 0 0 ) ) } local.fusespark_side waitmove local.fusespark_side anim start // these emitters are on by default, so if-statements not needed. local.fusefire_side anim start local.fusespark_side time local.firedelay // short time for fuse to travel between ranges if(local.name == "leftmost") { local.fusespark_side moveto ( local.fusespark_side.origin + ( 704 0 0 ) ) } if(local.name == "rightmost") { local.fusespark_side moveto ( local.fusespark_side.origin + ( -704 0 0 ) ) } if(local.name == "leftmost" || local.name == "rightmost") { local.fusespark_side waitmove } local.fusespark_side time local.fusetime local.fusespark_side moveto ( local.fusespark_side.origin + ( 0 -4800 0 ) ) local.fusespark_side waitmove local.fusespark_side stoploopsound local.random1 = randomint(3) if(local.random1 == 0) { local.fusespark_side playsound sparkup1 } if(local.random1 == 1) { local.fusespark_side playsound sparkup2 } if(local.random1 == 2) { local.fusespark_side playsound sparkup3 } local.fusespark_side remove local.fusefire_side remove end //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// detmid_ignitefields local.origin local.fusetime local.firetime local.waitmultiplier local.offtime: // middle detonator switch calls this thread first. local.firewait = local.fusetime * local.waitmultiplier local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) local.firedelay = local.fusetime * 0.14667 // if it takes 10 seconds to travel 4800 units, then to travel 704 units it takes 1.4667 seconds. // must multiply by a decimal number. cannot use " * (704 / 4800 )" otherwise local.firewait will round to the nearest integer. thread fusespark_downrange mid local.origin local.fusetime local.firedelay // begin the fuse, first going straight down the range from the detonator. wait local.firewait // let the fuse travel a bit before the fire appears, 1/5th the fusetime if waitmultiplier = 0.2. thread ignitefields_delay_middet local.fusetime local.firetime local.firedelay // outer two fires from mid detonator will start when fuse arrives. for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "b") anim start // start left middle adjacent fire anim $("fieldfire_" + local.n + "b") loopsound fireplace1 $("ffiretrig_" + local.n + "b") triggerable $("fieldfire_" + local.n + "c") anim start // start right middle adjacent fire anim $("fieldfire_" + local.n + "c") loopsound fireplace1 $("ffiretrig_" + local.n + "c") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_b triggerable $ffiretrigedge_c triggerable } } wait local.firetime for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "b") anim stop $("fieldfire_" + local.n + "b") stoploopsound $("ffiretrig_" + local.n + "b") nottriggerable $("fieldfire_" + local.n + "c") anim stop $("fieldfire_" + local.n + "c") stoploopsound $("ffiretrig_" + local.n + "c") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_b nottriggerable $ffiretrigedge_c nottriggerable } } wait local.offtime end ignitefields_delay_middet local.fusetime local.firetime local.firedelay: // make fire emitters adjacent to delayed secondary fuses wait longer before turning on. local.firetimeearly = local.firetime - local.firedelay // stop the main fire and delayed fire at the same time. local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) wait local.firedelay for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "a") anim start // leftmost fire range $("fieldfire_" + local.n + "a") loopsound fireplace1 $("ffiretrig_" + local.n + "a") triggerable $("fieldfire_" + local.n + "d") anim start // rightmost fire range $("fieldfire_" + local.n + "d") loopsound fireplace1 $("ffiretrig_" + local.n + "d") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_a triggerable $ffiretrigedge_d triggerable } } wait local.firetimeearly for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "a") anim stop $("fieldfire_" + local.n + "a") stoploopsound $("ffiretrig_" + local.n + "a") nottriggerable $("fieldfire_" + local.n + "d") anim stop $("fieldfire_" + local.n + "d") stoploopsound $("ffiretrig_" + local.n + "d") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_a nottriggerable $ffiretrigedge_d nottriggerable } } end //////////////////////////////////////////////////////////////////////// detleft_ignitefields local.origin local.fusetime local.firetime local.waitmultiplier local.offtime: // left detonator switch calls this thread first. local.firewait = local.fusetime * local.waitmultiplier local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) local.firedelay = local.fusetime * 0.14667 local.firedelay2 = local.fusetime * 0.29334 // if it takes 10 seconds to travel 4800 units, then to travel 1408 units it takes 2.9334 seconds. // must multiply by a decimal number. cannot use " * (704 / 4800 )" otherwise local.firewait will round to the nearest integer. thread fusespark_downrange left local.origin local.fusetime local.firedelay local.firedelay2 // begin the fuse, first going straight down the range from the detonator. wait local.firewait // let the fuse travel a bit before the fire appears, 1/5th the fusetime. thread ignitefields_delay_leftshort local.fusetime local.firetime local.firedelay // outer two fires from left detonator will start when fuse arrives. thread ignitefields_delay_leftfar local.fusetime local.firetime local.firedelay local.firedelay2 // outer two fires from left detonator will start when fuse arrives. for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "a") anim start $("fieldfire_" + local.n + "a") loopsound fireplace1 $("ffiretrig_" + local.n + "a") triggerable $("fieldfire_" + local.n + "b") anim start $("fieldfire_" + local.n + "b") loopsound fireplace1 $("ffiretrig_" + local.n + "b") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_a triggerable $ffiretrigedge_b triggerable } } wait local.firetime for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "a") anim stop $("fieldfire_" + local.n + "a") stoploopsound $("ffiretrig_" + local.n + "a") nottriggerable $("fieldfire_" + local.n + "b") anim stop $("fieldfire_" + local.n + "b") stoploopsound $("ffiretrig_" + local.n + "b") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_a nottriggerable $ffiretrigedge_b nottriggerable } } wait local.offtime end ignitefields_delay_leftshort local.fusetime local.firetime local.firedelay: local.firetimeearly = local.firetime - local.firedelay // stop the main fire and delayed fire at the same time. local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) wait local.firedelay for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "c") anim start $("fieldfire_" + local.n + "c") loopsound fireplace1 $("ffiretrig_" + local.n + "c") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_c triggerable } } wait local.firetimeearly for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "c") anim stop $("fieldfire_" + local.n + "c") stoploopsound $("ffiretrig_" + local.n + "c") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_c nottriggerable } } end ignitefields_delay_leftfar local.fusetime local.firetime local.firedelay local.firedelay2: local.firetimeearly = local.firetime - local.firedelay2 // stop the main fire and delayed fire at the same time. local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) wait local.firedelay2 for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "d") anim start $("fieldfire_" + local.n + "d") loopsound fireplace1 $("ffiretrig_" + local.n + "d") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_d triggerable } } wait local.firetimeearly for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "d") anim stop $("fieldfire_" + local.n + "d") stoploopsound $("ffiretrig_" + local.n + "d") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_d nottriggerable } } end //////////////////////////////////////////////////////////////////////// detright_ignitefields local.origin local.fusetime local.firetime local.waitmultiplier local.offtime: // right detonator switch calls this thread first. local.firewait = local.fusetime * local.waitmultiplier local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) local.firedelay = local.fusetime * 0.14667 local.firedelay2 = local.fusetime * 0.29334 // if it takes 10 seconds to travel 4800 units, then to travel 1408 units it takes 2.9334 seconds. // must multiply by a decimal number. cannot use " * (704 / 4800 )" otherwise local.firewait will round to the nearest integer. thread fusespark_downrange right local.origin local.fusetime local.firedelay local.firedelay2 // begin the fuse, first going straight down the range from the detonator. wait local.firewait // let the fuse travel a bit before the fire appears, 1/5th the fusetime. thread ignitefields_delay_rightshort local.fusetime local.firetime local.firedelay // outer two fires from left detonator will start when fuse arrives. thread ignitefields_delay_rightfar local.fusetime local.firetime local.firedelay local.firedelay2 // outer two fires from left detonator will start when fuse arrives. for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "c") anim start $("fieldfire_" + local.n + "c") loopsound fireplace1 $("ffiretrig_" + local.n + "c") triggerable $("fieldfire_" + local.n + "d") anim start $("fieldfire_" + local.n + "d") loopsound fireplace1 $("ffiretrig_" + local.n + "d") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_c triggerable $ffiretrigedge_d triggerable } } wait local.firetime for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "c") anim stop $("fieldfire_" + local.n + "c") stoploopsound $("ffiretrig_" + local.n + "c") nottriggerable $("fieldfire_" + local.n + "d") anim stop $("fieldfire_" + local.n + "d") stoploopsound $("ffiretrig_" + local.n + "d") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_c nottriggerable $ffiretrigedge_d nottriggerable } } wait local.offtime end ignitefields_delay_rightshort local.fusetime local.firetime local.firedelay: local.firetimeearly = local.firetime - local.firedelay // stop the main fire and delayed fire at the same time. local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) wait local.firedelay for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "b") anim start $("fieldfire_" + local.n + "b") loopsound fireplace1 $("ffiretrig_" + local.n + "b") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_b triggerable } } wait local.firetimeearly for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "b") anim stop $("fieldfire_" + local.n + "b") stoploopsound $("ffiretrig_" + local.n + "b") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_b nottriggerable } } end ignitefields_delay_rightfar local.fusetime local.firetime local.firedelay local.firedelay2: local.firedelay2 = local.fusetime * 0.29334 // if it takes 10 seconds to travel 4800 units, then to travel 1408 units it takes 2.9334 seconds. local.firetimeearly = local.firetime - local.firedelay2 // stop the main fire and delayed fire at the same time. local.waitinc = local.fusetime * 0.125 // wait increment start, fusetime * 1/8. (8 rows of 4 fire emitters) wait local.firedelay2 for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "a") anim start $("fieldfire_" + local.n + "a") loopsound fireplace1 $("ffiretrig_" + local.n + "a") triggerable if(local.n != 8) { wait local.waitinc } if(local.n == 8) { $ffiretrigedge_a triggerable } } wait local.firetimeearly for(local.n = 1; local.n <= 8; local.n++) { $("fieldfire_" + local.n + "a") anim stop $("fieldfire_" + local.n + "a") stoploopsound $("ffiretrig_" + local.n + "a") nottriggerable if(local.n != 8) { wait 0.25 } if(local.n == 8) { $ffiretrigedge_a nottriggerable } } end