Page 1 of 1
Light activated by zooming
Posted: Sat Nov 10, 2012 2:58 am
by CaptainPoopface
Does anyone know how to make a light attached to a weapon only work when the weapon is zoomed? There is a bit for "enables integrated night vision" but I think it's meaningless. I was wondering if there is a string id that can be set to the primary scale of an attached [ligh] tag so it only is activated when zoomed. Darkshallfall made a "night vision" HUD for the zoomed sniper rifle, but I think it was just a translucent green mask on the HUD, not anything that would illuminate a dark area.
I could make it work if I give up a trigger or crouch or melee, but I would prefer to use the zoom.
Re: Light activated by zooming
Posted: Sat Nov 10, 2012 11:36 am
by JacksonCougar
I would start by looking into the zoom bitmap and shader and see if it lists a SID that would be interchangeable for your goals. Then see about linking a light source to the weapon attachments with that SID.
However even if that did work I still would think you would have an issue because I would imagine that all the players would be able to see the light as well.
Re: Light activated by zooming
Posted: Sat Nov 10, 2012 3:58 pm
by Grimdoomer
There use to be an old tutorial on how to add night vision to the sniper rifle by swapping some effects to that of the plasma rifle charging effects, it only worked when zoomed in iirc. If you can find that tutorial on the halomods archive it may provide some useful information.
Re: Light activated by zooming
Posted: Mon Nov 12, 2012 12:51 am
by XZodia
I don't know the details but to clarify, you want to make the light only visible to the user.
And for the primary scale you could just search the list for related SIDs in entity, try searching zoom or r_thumb
Re: Light activated by zooming
Posted: Tue Nov 13, 2012 2:10 am
by CaptainPoopface
Grim's post rings a bell in the back of my mind, but I can't find the tutorial on halomods. I know effects and lights can be set to only be visible in first or third person. I was hoping it was some kind of string ID I could link an attachment to. My last hope is the string right_zoom, which comes up in the suggestion box. But that thing pulls strings out of everywhere, including jmads and bitmaps and everywhere else. I'll just have to try it.
The idea of a shader is also plausible. There is one map in the campaign where you're underwater and reflections of light on the water are cast on the biped from above. It's a really cool shader trick that I've never understood (or seen used in a mod). But as Jackson says, I don't think a shader can be set to render only in 1st or 3rd person.
Re: Light activated by zooming
Posted: Tue Nov 13, 2012 2:20 am
by Gary
CaptainPoopface wrote:Grim's post rings a bell in the back of my mind, but I can't find the tutorial on halomods. I know effects and lights can be set to only be visible in first or third person. I was hoping it was some kind of string ID I could link an attachment to. My last hope is the string right_zoom, which comes up in the suggestion box. But that thing pulls strings out of everywhere, including jmads and bitmaps and everywhere else. I'll just have to try it.
Yeah. I remember it was used the plasma pistol's FP charging light.
CaptainPoopface wrote:
The idea of a shader is also plausible. There is one map in the campaign where you're underwater and reflections of light on the water are cast on the biped from above. It's a really cool shader trick that I've never understood (or seen used in a mod). But as Jackson says, I don't think a shader can be set to render only in 1st or 3rd person.
I think that's probably just a light projecting a shader/animated texture.
Re: Light activated by zooming
Posted: Tue Nov 13, 2012 2:57 am
by troymac1ure
I did a mod on Warlock for SWAT where the BR had a green colored flashlight attached that was only visible in first person (and I was never good at mods, so I'm sure it was something simple), however never touched the only when zoomed thing. I believe it was just a check box or something.
I think I still have it, I'll check and post back.
EDIT:
In the [ligh] tag under the first set of flags there is a checkbox for "Only render in 1st person".
Also, in the [weap] attachments I have a 3p flashlight attahced to a marker called "weapon_background_zoomed". Not sure why, but meh.
Hopefully some of this helps.