main local.origin local.angles local.turnbackoff: local.detonator = spawn script_model local.detonator model "miscobj/detonator.tik" local.detonator.origin = local.origin local.detonator.angles = local.angles local.detonator anim idle local.detonator notsolid local.detonatortrig = spawn trigger_use local.detonatortrig.origin = local.detonator.origin local.detonatortrig setsize ( -20 -20 -20 ) ( 20 20 20 ) local.detonatortrig waittill trigger local.detonatortrig nottriggerable local.detonator anim fire local.detonator playsound plunger /////////////////////////////////////////////*** add code here ***////// local.player = parm.other local.player iprint ("*** Firing the detonator. ***") wait 2 //////////////////////////////////////////////////////////////////////// if(local.turnbackoff != 1) { local.detonatortrig triggerable local.detonatortrig waittill trigger local.detonatortrig nottriggerable } local.detonator anim idle local.detonator playsound light_switch /////////////////////////////////////////////*** add code here ***////// local.player = parm.other local.player iprint ("*** Resetting the detonator. ***") wait 1 //////////////////////////////////////////////////////////////////////// local.detonator remove local.detonatortrig remove thread main local.origin local.angles end