heinzbutzer Posted July 25, 2011 Share Posted July 25, 2011 Hello to everybody. i am trying to make a switch that when activated, at the same time, closes one special door and opens another one.It is no problem to control one door with a switch. But I think a switch can only have one linked reference. How is it possible to control two doors with one switch.Is it perhaps possible two make a door which opens every time another door closes. I tried to do this but my knowledge about the geck and fallout3 scripting is limited and although I tried many hours I did not succed. Also I could not find anything about this particular problem on the internet. I know there are probably some modding and scripting experts on this forum. Any help or advice would be welcome! Link to comment Share on other sites More sharing options...
Glenstorm Posted July 25, 2011 Share Posted July 25, 2011 Attach this to the switch scn SwitchScript BEGIN onActivate ;Will work only if one door is open and the other is closed. Expand it if you like. if Door01REF.GetOpenState == 0 && Door02REF.GetOpenState == 1 Door01REF.SetOpenState 1 Door02REF.SetOpenState 0 elseif Door01REF.GetOpenState == 1 && Door02REF.GetOpenState == 0 Door01REF.SetOpenState 0 Door02REF.SetOpenState 1 endif END Link to comment Share on other sites More sharing options...
heinzbutzer Posted August 4, 2011 Author Share Posted August 4, 2011 Attach this to the switch scn SwitchScript BEGIN onActivate ;Will work only if one door is open and the other is closed. Expand it if you like. if Door01REF.GetOpenState == 0 && Door02REF.GetOpenState == 1 Door01REF.SetOpenState 1 Door02REF.SetOpenState 0 elseif Door01REF.GetOpenState == 1 && Door02REF.GetOpenState == 0 Door01REF.SetOpenState 0 Door02REF.SetOpenState 1 endif END Link to comment Share on other sites More sharing options...
heinzbutzer Posted August 4, 2011 Author Share Posted August 4, 2011 Hallo Glenstorm ! Thank you very much for your fast help.I am sorry that I waited so long to thank you.Your script helped me a lot. But I think This line : if Door01REF.GetOpenState == 0 && Door02REF.GetOpenState == 1has to be corrected to this : if Door01REF.GetOpenState == 3 && Door02REF.GetOpenState == 1Because GetOpenState ==1 means open, 2 means opening, 3 mens closed, 4 means closing.But I could figure this out myself . Never the less your post was very helpful. Link to comment Share on other sites More sharing options...
Recommended Posts