how to make lights that turn of shoot them?
Post Reply
Quote
Re: how to make lights that turn of shoot them?
Posted by SVIN on Wed Jan 19th at 8:21pm 2005


how to make lights that turn of shoot them? i mean like street lamps that brakes (i dont want so if u shoot again the light comes again) [addsig]



Quote
Re: how to make lights that turn of shoot them?
Posted by dabait on Wed Jan 19th at 9:01pm 2005


In the old HalfLife, I'd create a func_breakable which targeted a light entity. The breakable can be anything you want... or nothing: an invisible brush that you put near your light 'fixture'. Here's a diagram (looks better on a white background) that shows a setup that includes the glowing sprite near the 'bulb' -- it could be simplied to just include the func_breakable and light entities if you wanted:


Now, in HL2... there might be some changes, but it seems like this should still work -- see the next post... good info there.




Quote
Re: how to make lights that turn of shoot them?
Posted by Neural Scan on Wed Jan 19th at 9:06pm 2005


It's the same process as hl1 (you need a func_breakable and a light), but instead of targetting other entities you use the Input/Output system. My guess is you create and input on the breakable (something like On Break, there'll be a list of stuff) which targets the light. The output is then chosen (Turn Off will probably be listed).

I haven't looked much at it, but the Input/Output system is actually very simple, it only took me a minute to see how it worked. There's always tutorials though (I think there's one right here on Snarkpit).

Have fun.





Quote
Re: how to make lights that turn of shoot them?
Posted by dabait on Wed Jan 19th at 9:08pm 2005


Quite right! The 'input' and 'output' aspects of the HL2 entity system had slipped my mind! Big improvement!





Quote
Re: how to make lights that turn of shoot them?
Posted by Dred_furst on Wed Jan 19th at 9:16pm 2005


Indeed, also looks cooler with a swinging light,
[addsig]




Quote
Re: how to make lights that turn of shoot them?
Posted by Nasher on Wed Jan 19th at 9:34pm 2005


Try an invisible func_button with "damage activates" ticked over the light you want to shoot, then just add the light into the output etc.



Quote
Re: how to make lights that turn of shoot them?
Posted by Leperous on Wed Jan 19th at 11:01pm 2005


Why bother with an env_render, just Kill the sprite!




Post Reply