This is my first tutorial. Please give comment.
Simple Light Switch tutorial:
It`s very simple to make your own light switch!
Let`s get started:
1. Make a simple room. Just a simple room.
2. Enable Render Mode and Realtime mode
You don`t see anything?
3. Let`s make some lights. How many depends on your room size.
4. Make a func static and choose a model. I use skmachines/skgenerator.lwo.
5. Then clone your func_static with <spacebar> and delete your old func_static with <backspace>.
6. Now select a light gui. If you want to make your func_static malfunction use guis/screens/malfunction*.gui or use guis/caves/generator.gui. If not, your gui will be guis/controlpanels/lightswitch3.gui or lightswitch.gui or powerswitch.gui.
7. Make a trigger_relay and give it these keys: |name - trigger_light_1|delay - 1.5|
8. Unselect everything and select the generator and give it the key |target - trigger_light_1|
7. Unselect everything and select the trigger_light_1 and select the light you want to shutdown/power-up
8. Save your map, compile map with dmap, and run your map!
9. You see, the generator says that the lights are off, but the lights are on. Toggle the generator and the generator sets the hide key on the connected lights to 1. It have to be 0. So go back to the editor set to the lights hide =1. It`s not the official way, but use this method if you don`t use a model or texture for your light, else you must use start_off =1. I recommended this method, because if you are checking you level on errors or bugs or something like that in render mode, you see only pitch black if you use start_off=1.
And a another thing: When you make two light switches for the same lights, if you shut down the lights with gui 1, gui 1 says that the light are off. It is. But gui 2 is still telling you that the lights are on. Is it possible to fix this?
If you want the lights to fade in, you have to have a:
'tigger_once' target a 'target_entity_fadein'(with the parm: _color set to
'1 1 1'. The entity_fadein targets the light which is colored black.
Now have the func_static target the trigger_once and there ya' go!
theres an easyer way to make a light switch,pretty much the same but u dont need the relay trigger,
1. make ur room
2.make a func static,goto model and get sumthing with a gui (eg.model/guiobjects/tech panel 1)and give it a lightswitch gui(gui/controlpanels/powerswitch)
3.now make ur light
if u want ur light to be turned on with the switch ,select the light and give it the key/val start_off - 1.if u want it turned off dont use the start off,this is good if u have say a red light in the room and u want it to go off when the other go on.
now select the switch then the light!!! u must do it this way,so the switch triggers the light,then press shift - k to link them,follow that step for all ur lights that u want triggered with the switch.the path line should be green