Jump to content

I need help with a basic script


SpartanISW108

Recommended Posts

Hello, I'm trying to create a basic mod for Fallout 3 (I posted on NV forums as it gets more traffic) where the computer systems in the citadel can turn turned on/off at will.

 

My setup is model swaps, with all the off computers set to initially disabled and all the on (default computers) currently enabled. My current script for the On/Off is two separate scripts attached to two separate switches

Scn BoSComputersOFFScript
begin OnActivate
MainframeSmallOff1.enable
MainframeSmallOff2.enable
MainframeSmallOff3.enable
MainframeSmallOff4.enable
MainframeSmallOff5.enable
MainframeSmallOn1.disable
MainframeSmallOn2.disable
MainframeSmallOn3.disable
MainframeSmallOn4.disable
MainframeSmallOn5.disable
MainframeLight1.disable
MainframeLight2.disable
MainframeLight3.disable
MainframeLight4.disable
MainframeLight5.disable
MainframeLight6.disable
MainframeLight7.disable
MainframeLight8.disable
MainframeLight9.disable
MainframeLight10.disable
BoSSwitchOFF.disable
BosSwitchON.enable
end

However, I'd like to make it so that I only have to use 1 script, and 1 switch so the disappearing before my eyes and reappearing before my eyes switch isn't present. I thought that the best way to do this would be by using the light switch script from this page: http://geck.bethsoft.com/index.php?title=Useful_Scripts
My current set up using this script is having all the systems that are supposed to be on linked via enable parent to an X marker, and all the systems that are off set to an initially disabled enable parent X marker.
My current script is:
scn BosComputersONOFFtestScript
ref light
Begin OnActivate
if BoSSystemsOn.GetDisabled
BoSSystemsOn.Enable
playsound objmainframeboot
else
BoSSystemsOn.Disable
if BoSSystemsOff.GetDisabled
BoSSystemsOff.Disable
else
BoSSystemsOff.Enable
endif
Activate
End

I did another slightly modified version of this which allowed me to enable/disable the on systems at will, but the second condition of the off systems wouldn't enable when the on systems were disabled.

So how would I make this condition where the on systems X marker gets disabled and the off systems x marker gets enabled, and then the opposite when the switch is hit again (on systems enable, then the off systems disable)
I'm fairly new to scripting so any help would be appreciated

many thanks in advance

 

Link to comment
Share on other sites

Just a note I managed to sort this problem out now using only one X marker. I just linked every computer system effected by this script to the enable parent X marker. Then set all the computers I want to be off to just use the "Set enable state to opposite of parent" flag. and it worked. Using just one block.

Thank again people

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...