Has anyone created a cog for a door that can only be opened by pressing multiple switches simultaneously?
This is the static archive of the Massassi Forums. The forums are
closed indefinitely. Thanks for all the memories!
You can also download
Super Old Archived Message Boards
from when Massassi first started.
"View" counts are as of the day the forums were archived, and will no longer increase.
Symbols surface switch1 linkid=1 surface switch2 linkid=1 surface switch3 linkid=1 surface switch4 linkid=1 sound soundon=beep1.wav sound soundoff=beep2.wav int switcher=0 local int count=0 local int switch local end code activated: if (GetSenderID() != 1) return; //message not from switch switch = GetSenderRef(); if (GetWallCel(switch) != 0) return; //switch already on setwallcel(switch, 1); PlaySoundPos(soundon, SurfaceCenter(switch), 1, -1, -1, 0 ); count=(count+1); if ((switch==switch1) && (switcher==0)) { //switch1 activated first switcher=1; } else if ((switch==switch2) && (switcher==1)) { //switch2 activated second switcher=2; } else if ((switch==switch3) && (switcher==2)) { //switch3 activated third switcher=2; } else if ((switch==switch4) && (switcher==3)) { //switch4 activated fourth switcher=4; call opendoors; //or put open door code here } else if ((count==4) && (switcher!=4)) { //then reset switches sleep(0.5); PlaySoundPos(soundoff, SurfaceCenter(switch), 1, -1, -1, 0 ); setwallcel(switch1, 0); setwallcel(switch2, 0); setwallcel(switch3, 0); setwallcel(switch4, 0); } return; end