Freaky light triggering Created 18 years ago2005-08-03 04:02:57 UTC by Andy Gone Andy Gone

Created 18 years ago2005-08-03 04:02:57 UTC by Andy Gone Andy Gone

Posted 18 years ago2005-08-03 04:02:57 UTC Post #125570
I've recently encountered a strange (to me) thing.

I was trying to make a kinda breakable halogen lamp. To do so, I've done a box textured like broken lamp, then covered the front face with func_breakable textured as lit lamp.

I have used 2 lights: light_spot to create a beam (info_target used to direct it), and light to create a kind of halo in the vicinity of my lamp. In both lamps, "initialy dark" is OFF of course.

Then, func_breakable targets a trigger_relay, which targets a multi_manager, which targets both lights.

When I compiled this and shot the lamp, next round I was amazed, because light entity was on, but light_spot was off :o When I shot the lamp again, of course, it was toggled, so light entity went off, but the light_spot switched on.

Putting "trigger state" to OFF in the trigger_relay does not help. I thought maybe this OFF commang does not pass through the multi_manager well, so I tried to put it this way: func_breakable targets a multi_manager, which targets two trigger_relays (with trigger state OFF), which target the lights respectively. OK, this way the light_spot stopped turning ON when the lamp was shot, but it did not want to be ON next round either, while with the light entity there was no problem.

The only solution was (to me) to use additional trigger_relay named game_playerspawn with trigger state ON to switch on the light_spot.

Is this "normal" behavior of the light_spot entity? (again, with the light, there was no problem).
Posted 18 years ago2005-08-03 04:24:28 UTC Post #125574
use textlights. That should answer to your question http://twhl.co.za/tutorial.php?id=54. There is some examples in the vault for switchable ones.
Posted 18 years ago2005-08-03 04:26:27 UTC Post #125575
I'd guess it's its usual behaviour if that's what it does in the situation described. I haven't ever used light_spots really.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 18 years ago2005-08-03 06:23:55 UTC Post #125607
2 SpaG
Thank you, but unfortunately light textures cannot do what I want.

Anyway, it works like I finally did it (with 4 internediate entities to control just 2 lights :lol: ) -- I just wanted to know if there any more simple way.
Posted 18 years ago2005-08-03 09:22:48 UTC Post #125642
Here, try this.. it's using textlights.. might help you out a bit more to understand texlights, and the ZHLT's options. ;)
Unbreakable UnbreakableWindows 7.9 Rating!
Posted 18 years ago2005-08-03 09:59:52 UTC Post #125656
If you have the breakable target a multi-manager, the multi-manager can toggle the two light entities directly. You don't need trigger-relays for that. Just give each light a name and target each by name with multi-manager entries.
Posted 18 years ago2005-08-03 12:00:45 UTC Post #125695
hmmm, could have sworn I linked it...

http://twhl.co.za/mapvault_map.php?id=3227
Unbreakable UnbreakableWindows 7.9 Rating!
Posted 18 years ago2005-08-04 04:14:03 UTC Post #125812
2 all who insists on texture lights

Thank you a lot, just tell me - is it possible to direct the light from light texture somewhere? If not, I cannot achieve what I want in my case, even the texture lights being nice, easy, comfortable, toggle-able, whatever.

BTW I did use light texture on my lamp to make the lamp texture glow, but I also want it's light to be directed, so I had to add light entities.

I did not use possibility to toggle light textures, because there is no use to do so: when the light-textured func_breakable breaks, it cannot display a texture any more, regardless you toggle it or not.

2 Unbreakable
I've checked your example, and this is approx. what I've also done, except I used multi_manager instead of using entities with the same name, because when the light is shot, I switch off the beam light, then in 0.1 sec I switch off the omnidirectional light. This gives more realistic effect of "slow extinguishing" a mercury lamp has. Also I put "explode magnitude" 10 to add more blast. Note that even using light textures, you use additional togglable light which you switch off when the lamp is shot.

If you wish, you could check the result that I use in my map awp_construction here: http://twhl.co.za/mapvault_map.php?id=3229
Posted 18 years ago2005-08-04 04:58:47 UTC Post #125813
Hmmm i think texture lights cannot be directed somewhere. Well i haven't heard of that.
Posted 18 years ago2005-08-04 11:01:14 UTC Post #125898
well, whatever direction the lights face texture is pointing towards.
I see what you mean now though, sounds really cool btw.
Unbreakable UnbreakableWindows 7.9 Rating!
You must be logged in to post a response.