LuciusConfucius Posted September 10, 2011 Posted September 10, 2011 Hey!I'm adding a warning system to my complex. Basically I'm placing one standard initially active lightsource under all lamps in a cell together with one initally disabled lightsource that is a red warning light.And I would like to have a quick script for disabling all the normal lights and activating all the warning lights by the push of a computer button(ingame computer).So far I plan on referencing every single lamp like this:Warning Mode On ScriptAlarmLight1.EnableAlarmLight2.EnableAlarmLight3.Enableetc...NormalLight1.DisableNormalLight2.DisableNormalLight3.Disableetc... I would like to know if there is any script to disable/enable all lights of "type" in "cell" wich would make the code basically two lines, since my complex is huge it's going to take a long time to get it all done.Any help is very welcome, and sorry if my English is a bit unclear!Thanks in advance!
Quetzlsacatanango Posted September 10, 2011 Posted September 10, 2011 Look up "enable parents"Basically, make 1 light persistent and give it a ref name. Or else use an xmarker for the same function to act as a "switch"Set this ref as the enable parents for all your other lights. Then when you enable or disable it, all the others will go right along with it. It works for anything, not just lights.
LuciusConfucius Posted September 10, 2011 Author Posted September 10, 2011 Thanks a lot mate! This will help me a lot.Thanks!
Recommended Posts