Deleted2746547User Posted July 16, 2011 Share Posted July 16, 2011 I'm working on a project and I could use some help.... I have a script that works for 3 light switches to 3 x markers (a varying number of lights tied to each x marker).. however, whenever i add a 4th or 5th light switch, only he first two will work after that and it "breaks" the rest... every single time. It won't even let you "select" the light switches any more.. unless you delete them and then start a new one. then it works if you play in game. once you go back to geck and create the next one... it break all except he first two again? any ideas? Link to comment Share on other sites More sharing options...
Korodic Posted July 16, 2011 Share Posted July 16, 2011 I'm working on a project and I could use some help.... I have a script that works for 3 light switches to 3 x markers (a varying number of lights tied to each x marker).. however, whenever i add a 4th or 5th light switch, only he first two will work after that and it "breaks" the rest... every single time. It won't even let you "select" the light switches any more.. unless you delete them and then start a new one. then it works if you play in game. once you go back to geck and create the next one... it break all except he first two again? any ideas? Please show your code for controlling the lights. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 17, 2011 Author Share Posted July 17, 2011 It is part of several scripts designed to enable the use of power & lights by adding fuel to a tanklights (and the on/off light fixtures etc.) in each building are enabled to the x marker in the cell. the x marker is a linked ref. of an activator switch. THANKS### so, i'll give you each script used to maybe see my error.... 1. FUEL TANK------------------scn BlackbriarFuelTankBegin onActivate If GetQuestRunning BlackbriarPowerBaseQuest Else StartQuest BlackbriarPowerBaseQuest Endif If player.GetItemCount FissionBattery player.removeItem FissionBattery 1 set BlackbriarPowerBaseQuest.Fuel to BlackbriarPowerBaseQuest.Fuel + 10000 Else; ShowMessage BlackbriarPowerNoBatteries ; Uncomment when/if you want to display a msg. EndifEnd 2. Power Light Switch____________________ScriptName BlackbriarPowerLightScript ref light Begin OnActivate if BlackbriarPowerBaseQuest.Fuel == 0 return Endif if light == 0 set light to GetLinkedRef endif if light.GetDisabled light.Enable else light.Disable endif ActivateEnd 3. BasePowerQuest____________________scn BlackbriarPowerBaseQuestScript int Fuel ; This is the total fuel units in stockint FuelRqd ; This is the calculated amount that will be used in a single 5 second period Begin GameMode If Fuel Else return Endif set FuelRqd to 0 ;Lghts1 uses 3 unit of Fuel/5sec If BlackbriarLgts1.GetDisabled Else set FuelRqd to FuelRqd + 3 Endif ;Lghts2 uses 1 unit of Fuel/5sec If BlackbriarLgts2.GetDisabled Else set FuelRqd to FuelRqd + 1 Endif ;Lghts3 uses 2 unit of Fuel/5sec If BlackbriarLgts3.GetDisabled Else set FuelRqd to FuelRqd + 2 Endif ;Lghts4 uses 1 unit of Fuel/5sec If BlackbriarLgts4.GetDisabled Else set FuelRqd to FuelRqd + 1 Endif ;Lghts5 uses 1 unit of Fuel/5sec If BlackbriarLgts5.GetDisabled Else set FuelRqd to FuelRqd + 1 Endif ;Lghts6 uses 1 unit of Fuel/5sec If BlackbriarLgts6.GetDisabled Else set FuelRqd to FuelRqd + 1 Endif ;Subtract the fuel used set Fuel to Fuel - FuelRqd ;Turn off all power users when Fuel runs out. If Fuel < 1 set Fuel to 0 BlackbriarLgts1.Disable BlackbriarLgts2.Disable BlackbriarLgts3.Disable BlackbriarLgts4.Disable BlackbriarLgts5.Disable BlackbriarLgts6.Disable Endif End Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 17, 2011 Author Share Posted July 17, 2011 Again, regardless of what I do, the Perimeter Lighting and the RPC switches work appropriately.. and sometimes the ASC will but if I add a 4,5, 6th switch it breaks and disables all the switches but the first two...??? Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 17, 2011 Author Share Posted July 17, 2011 thanks for replying ... I fixed it... crazy, the switches were too close to another model... arghhh... Thanks T for the tip! And S... thanks for replying! Link to comment Share on other sites More sharing options...
Recommended Posts