Im making a small mod for myself as a starting point to a larger mod for publishing. I have 3 questions and only because i cant seem to find an answer or tutorial pointing me in the right direction.
Question 2
I want to have a generator that needs to be repaired. How is this done?
Question 3
How do I link that generator to powered items such as lights, doors and consoles so they only work after there is power?
I would love to find a tutorial that will guide me. Thank you for any help or advice.
#2 There is a generator outside the Mining Office in Sloan that you can examine in GECK to see how they implented it. It requires the Repair skill to fix. I'm not sure the following is how they did the Sloan Generator, but for many broken objects such as the Solar Array Mirrors at Nellis, there are sometimes 2 references to an object: one broken and one working. The game initializes witht he broken reference enabled and the fixed reference disabled. When you repair the item, the script disables the broken reference and enables the fixed reference. So if you were to use this method it would lead to the following solution for #3 ...
#3 To link any object to lights just test if the fixed version of your generator reference is enabled, then enable your illumination references if that is true. As you may already know, the physical/visible lightbulbs themselves are statics and don't actually illuminate, it is a light source that provides the actual illumination, so for realism you need at least two object references for a light -- the bulb object and the light itself. You'd just want to enable or disable the illuminators to turn the lights on and off; however, you might also want to check if there are two difference versions of a lightbulb that appear to be on or off as well. IIRC there is a simple mod that has a lightswitch in a room that turns a light on or off, it was called the Novac Gas Station Home or something like that, it was on Nexus IIRC. Pretty compact housing mod so it would be easy to study.
Hope that helps some.