main local.name local.origin local.angles local.rotatetime local.rotateamount local.clockwise: local.valve = spawn script_model targetname ("finalvalve_switch" + local.name) local.valve model "animate/redvalve_nopulse.tik" local.valve.origin = local.origin local.valve.angles = local.angles local.valve notsolid local.valve.clockwise = local.clockwise local.valvetrig = spawn trigger_use targetname ("finalvalve_trigger" + local.name) local.valvetrig.origin = local.valve.origin local.valvetrig setsize ( -20 -20 -20 ) ( 20 20 20 ) local.valvetrig waittill trigger local.valvetrig nottriggerable local.valve.model = animate/redvalve_pulse.tik /////////////////////////////////////////////*** add code here ***////// thread othervalve_animonly local.name local.rotatetime local.rotateamount local.player = parm.other if(local.clockwise != 1) { local.player iprint ("*** Rotating valve counterclockwise. ***") } if(local.clockwise == 1) { local.player iprint ("*** Rotating valve clockwise. ***") } if(level.finaltables_move != 1) { level.finaltables_move = 0 } exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 1 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 2 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 3 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 4 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 5 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 6 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 7 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 8 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 9 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 10 level.finaltables_move local.rotatetime exec maps/UBER_mapextras/training_cratesstuff.scr::movefinaltables 11 level.finaltables_move local.rotatetime level.finaltables_move++ if(level.finaltables_move >= 2) { level.finaltables_move = 0 } //////////////////////////////////////////////////////////////////////// local.valve time (local.rotatetime) local.valve playsound valve_switch if(local.clockwise != 1) { local.valve rotateZup local.rotateamount } if(local.clockwise == 1) { local.valve rotateZdown local.rotateamount } local.valve waitmove local.valve.model = animate/redvalve_nopulse.tik //wait 1 local.clockwise++ if(local.clockwise >= 2) { local.clockwise = 0 } local.valve remove local.valvetrig remove thread main local.name local.origin local.angles local.rotatetime local.rotateamount local.clockwise end //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// othervalve_animonly local.name local.rotatetime local.rotateamount: // local.name must be "1" or "2" local.name++ if(local.name >= 3) { local.name = 1 } // chooses the other valve's name $("finalvalve_trigger" + local.name) nottriggerable $("finalvalve_switch" + local.name) time (local.rotatetime) $("finalvalve_switch" + local.name).model = animate/redvalve_pulse.tik $("finalvalve_switch" + local.name) playsound valve_switch if($("finalvalve_switch" + local.name).clockwise != 1) { $("finalvalve_switch" + local.name) rotateZup local.rotateamount } if($("finalvalve_switch" + local.name).clockwise == 1) { $("finalvalve_switch" + local.name) rotateZdown local.rotateamount } $("finalvalve_switch" + local.name) waitmove $("finalvalve_switch" + local.name).model = animate/redvalve_nopulse.tik $("finalvalve_trigger" + local.name) triggerable $("finalvalve_switch" + local.name).clockwise++ if($("finalvalve_switch" + local.name).clockwise >= 2) { $("finalvalve_switch" + local.name).clockwise = 0 } end