Jump to content

Enabling and Disabling all lights in a cell.


LuciusConfucius

Recommended Posts

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 Script

AlarmLight1.Enable

AlarmLight2.Enable

AlarmLight3.Enable

etc...

NormalLight1.Disable

NormalLight2.Disable

NormalLight3.Disable

etc...

 

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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