main local.name local.r local.g local.b local.radius: local.lampswitch = spawn trigger_use local.lampswitch.origin = $(local.name).origin local.lampswitch setsize ( -10 -10 -10 ) ( 10 10 10 ) local.lampswitch waittill trigger local.lampswitch nottriggerable $(local.name) light local.r local.g local.b local.radius //1 0.96 0.8 250 /////////////////////////////////////////////*** add code here ***////// //local.player = parm.other //local.player iprint ("*** Turning on the lamp. ***") //wait 1 //////////////////////////////////////////////////////////////////////// local.lampswitch triggerable local.lampswitch waittill trigger $(local.name) light 0 0 0 0 /////////////////////////////////////////////*** add code here ***////// //local.player = parm.other //local.player iprint ("*** Turning off the lamp. ***") //wait 1 //////////////////////////////////////////////////////////////////////// local.lampswitch remove local.bomb remove thread main local.name local.r local.g local.b local.radius end