wood_doors local.nameleft local.nameright local.rotate: self waittill trigger self nottriggerable $(local.nameleft) time 0.9 $(local.nameright) time 0.9 self.inc++ if(self.inc > 1 || self.inc == NIL) { self.inc = 0 } if(self.inc == 0) { local.r = randomint(4) if(local.r == 0) { $(local.nameleft) playsound door_wood_open_move1; $(local.nameright) playsound door_wood_open_move1 } if(local.r == 1) { $(local.nameleft) playsound door_wood_open_move2; $(local.nameright) playsound door_wood_open_move2 } if(local.r == 2) { $(local.nameleft) playsound door_wood_open_move3; $(local.nameright) playsound door_wood_open_move3 } if(local.r == 3) { $(local.nameleft) playsound door_wood_open_move4; $(local.nameright) playsound door_wood_open_move4 } $(local.nameleft) thread rotateup local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotateup local.rotate } $(local.nameright) waitthread rotatedown local.rotate $(local.nameleft) playsound door_wood_open_stop; $(local.nameright) playsound door_wood_open_stop } if(self.inc == 1) { local.r = randomint(2) if(local.r == 0) { $(local.nameleft) playsound door_wood_close_move1; $(local.nameright) playsound door_wood_close_move1 } if(local.r == 1) { $(local.nameleft) playsound door_wood_close_move2; $(local.nameright) playsound door_wood_close_move2 } $(local.nameleft) thread rotatedown local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotatedown local.rotate } $(local.nameright) waitthread rotateup local.rotate local.r = randomint(3) if(local.r == 0) { $(local.nameleft) playsound door_wood_close_stop1; $(local.nameright) playsound door_wood_close_stop1 } if(local.r == 1) { $(local.nameleft) playsound door_wood_close_stop2; $(local.nameright) playsound door_wood_close_stop2 } if(local.r == 2) { $(local.nameleft) playsound door_wood_close_stop3; $(local.nameright) playsound door_wood_close_stop3 } } self triggerable self thread wood_doors local.nameleft local.nameright local.rotate end wood_gates local.nameleft local.nameright local.rotate: self waittill trigger self nottriggerable $(local.nameleft) time 3.45 $(local.nameright) time 3.45 self.inc++ if(self.inc > 1 || self.inc == NIL) { self.inc = 0 } if(self.inc == 0) { $(local.nameleft) playsound gate_wood_open; $(local.nameright) playsound gate_wood_open $(local.nameleft) thread rotateup local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotateup local.rotate } $(local.nameright) waitthread rotatedown local.rotate } if(self.inc == 1) { $(local.nameleft) playsound gate_wood_close; $(local.nameright) playsound gate_wood_close $(local.nameleft) thread rotatedown local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotatedown local.rotate } $(local.nameright) waitthread rotateup local.rotate } self triggerable self thread wood_gates local.nameleft local.nameright local.rotate end metal_gates local.nameleft local.nameright local.rotate: self waittill trigger self nottriggerable $(local.nameleft) time 1.5 $(local.nameright) time 1.5 self.inc++ if(self.inc > 1 || self.inc == NIL) { self.inc = 0 } if(self.inc == 0) { local.r = randomint(3) if(local.r == 0) { $(local.nameleft) playsound gate_iron_open1; $(local.nameright) playsound gate_iron_open1 } if(local.r == 1) { $(local.nameleft) playsound gate_iron_open2; $(local.nameright) playsound gate_iron_open2 } if(local.r == 2) { $(local.nameleft) playsound gate_iron_open3; $(local.nameright) playsound gate_iron_open3 } $(local.nameleft) thread rotateup local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotateup local.rotate } $(local.nameright) waitthread rotatedown local.rotate } if(self.inc == 1) { $(local.nameleft) playsound gate_iron_close; $(local.nameright) playsound gate_iron_close $(local.nameleft) thread rotatedown local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotatedown local.rotate } $(local.nameright) waitthread rotateup local.rotate } self triggerable self thread metal_gates local.nameleft local.nameright local.rotate end metal_doors local.nameleft local.nameright local.rotate: self waittill trigger self nottriggerable $(local.nameleft) time 1.5 $(local.nameright) time 1.5 self.inc++ if(self.inc > 1 || self.inc == NIL) { self.inc = 0 } if(self.inc == 0) { local.r = randomint(2) if(local.r == 0) { $(local.nameleft) playsound gate_iron_open2; $(local.nameright) playsound gate_iron_open2 } if(local.r == 1) { $(local.nameleft) playsound gate_iron_open3; $(local.nameright) playsound gate_iron_open3 } $(local.nameleft) thread rotateup local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotateup local.rotate } $(local.nameright) waitthread rotatedown local.rotate } if(self.inc == 1) { $(local.nameleft) playsound gate_iron_close; $(local.nameright) playsound gate_iron_close $(local.nameleft) thread rotatedown local.rotate if(local.nameright == NIL) { $(local.nameleft) waitthread rotatedown local.rotate } $(local.nameright) waitthread rotateup local.rotate } self triggerable self thread metal_doors local.nameleft local.nameright local.rotate end shutters local.nameleft local.nameright local.rotate: self waittill trigger self nottriggerable $(local.nameleft) time 0.42 $(local.nameright) time 0.42 local.r = randomint(4) if(local.r == 0) { $(local.nameleft) playsound shuttersqueak_01; $(local.nameright) playsound shuttersqueak_01 } if(local.r == 1) { $(local.nameleft) playsound shuttersqueak_02; $(local.nameright) playsound shuttersqueak_02 } if(local.r == 2) { $(local.nameleft) playsound shuttersqueak_03; $(local.nameright) playsound shuttersqueak_03 } if(local.r == 3) { $(local.nameleft) playsound shuttersqueak_04; $(local.nameright) playsound shuttersqueak_04 } self.inc++ if(self.inc > 1 || self.inc == NIL) { self.inc = 0 } if(self.inc == 0) { $(local.nameleft) thread rotatedown local.rotate $(local.nameright) waitthread rotateup local.rotate } if(self.inc == 1) { $(local.nameleft) thread rotateup local.rotate $(local.nameright) waitthread rotatedown local.rotate } self triggerable self thread shutters local.nameleft local.nameright local.rotate end rotatedown local.amount: self rotateydown local.amount self waitmove end rotateup local.amount: self rotateyup local.amount self waitmove end