The flashlight will be attached to the gun. It must be a gun. Not blades, knives etc. First equip a gun and then activate the flashlight. In addition to this, the flashlight will realistically illuminate in the direction of the gun in any situation. Also don't forget to set the key in CET bindings!
Latest Changes:
Disabled the ability to turn on the flashlight while in the car to prevent the car from exploding.
Firstly I want to say thank you for your hard work. Your mod is the single normal one flashlight in the nexus mod. For example this one "https://www.nexusmods.com/cyberpunk2077/mods/2913?tab=files&file_id=50553&nmm=1" light not from the gun, but from the head. And it is nor realistic at all when you get closer to the wall. But your mod works more properly from this point of wiew.
But I would like to ask you a thing to improve your own mod. Firstly is to give players possibility to have white color. Secondary make it less wide or something like that. Because yes, if you get close to the wall the light will realisticaly point from the gun, but even like this the light flashes too big area on the wall, even if you get really close to it. Or make it adjustable, similar to "Simple flashlight" mod. Thank you for your attention.
Hey :] for some reason, the light isn't showing up at all for me even though I've equipped a gun and set the key bind. I don't have any other flashlight mods either.
Oooh, that looks nice. Thanks for making it ! Two questions though : - Does it have controller support ? - By extension, could it use input loader to be able to rebind it easily ? Or maybe like the Kiroshi Optics Night Vision mod does, with custom keybinds in native settings UI ?
so does it have controller support? it would be nice as hell to be able to hold left on the d pad, the mod simple flashlight allows you too but it dosnt look as good as your mod does
I don't know how you'd find that "nice as hell" as Simple Flashlight controller keybind is intrusive as it's interfering with the radioport toggle and can't be changed... I like its usefulness but it's subpar for controller users... Can't stress that enough.
Hopefully b13nxx will bring proper controller support... I guess the lack of answer is either sign it's taking time to implement - in which case thanks a lot for doing it - or that this won't be added - in which case it's no problem but gotta admit I'd like to know as well.
The thing is I really want to add custom keybinds via Native Settings for gamepad users. But I don't know any single way to implement "Keypress Tracking" functionality without Redscript dependency, as of today. But if you know the way with purely CET, please lemme know. Btw, the reason I don't want to use redscript (a really great tool) is not about redscript itself. I just want this mod to be really pure and simple, without any other dependencies, that's why.
So you're best bet is to use a program for mapping gamepad input to keyboard input.
If you want to minimize dependencies, you could organize an hypothetical Native Settings UI part with a multi-choice entry (like the dlss quality slider for example) to allow the player to choose which input key(s) to use. Sounds like having to list "tons" of potential inputs in code for just one or two to choose from (personally I'd combine two dpad buttons - "diagonal combo") but that would be doable for basic controller support.
Thing is I doubt CET reacts to controller inputs as such but only to defined actions but I could be gladly wrong on that.
Remapping soft could be an option too but not as of now to me and would have the UI hints switching from controller to keyboard as a caveat.
I really like the idea of having a gun light. Question, is it possible to adjust how "far" the light will illuminate? If this is something that is super difficult to do, no worries, I was just hoping to increase its distance slightly.
Even if the above is not possible, thank you for releasing this!
thx for the great light ;) much more immersive/realitic than simple flashlight - try to adjust it like a real flashlight but i give up and found this one :)
i notice when you turn off the light you step a bit back. i change the 'turn off' sound same to the 'turn on' sound .. for me its sounds better.
question: why is the light purple (i like it) and will there an option for change the color or maybe some variants
Hey friend. Just letting you know, you should look into using scheduling for your update loop. Processing things on every single update is not only unnecessary, but can be detrimental to performance in some cases. For the context of what your mod does, you could likely get away with updating the position of the light every 33ms.
Otherwise, a neat trick spawning a light like that. I'm surprised you couldn't just parent the transforms somehow so you wouldn't need to manually update the entity yourself, and only concern with creation and deactivation of the lightsource.
I actually used cronjob at first, but I removed it because the movement of the light didn't feel natural. Maybe I can try again.
If we could somehow make the object we create a part of the weapon, the game engine itself would take care of the positioning. But as far as I know there is no way to do that.
60 comments
In addition to this, the flashlight will realistically illuminate in the direction of the gun in any situation.
Also don't forget to set the key in CET bindings!
Latest Changes:
Thanks for trying the mod!
But I would like to ask you a thing to improve your own mod. Firstly is to give players possibility to have white color.
Secondary make it less wide or something like that. Because yes, if you get close to the wall the light will realisticaly point from the gun, but even like this the light flashes too big area on the wall, even if you get really close to it. Or make it adjustable, similar to "Simple flashlight" mod. Thank you for your attention.
- Does it have controller support ?
- By extension, could it use input loader to be able to rebind it easily ? Or maybe like the Kiroshi Optics Night Vision mod does, with custom keybinds in native settings UI ?
Hopefully b13nxx will bring proper controller support...
I guess the lack of answer is either sign it's taking time to implement - in which case thanks a lot for doing it - or that this won't be added - in which case it's no problem but gotta admit I'd like to know as well.
So you're best bet is to use a program for mapping gamepad input to keyboard input.
Sounds like having to list "tons" of potential inputs in code for just one or two to choose from (personally I'd combine two dpad buttons - "diagonal combo") but that would be doable for basic controller support.
Thing is I doubt CET reacts to controller inputs as such but only to defined actions but I could be gladly wrong on that.
Remapping soft could be an option too but not as of now to me and would have the UI hints switching from controller to keyboard as a caveat.
I really like the idea of having a gun light. Question, is it possible to adjust how "far" the light will illuminate? If this is something that is super difficult to do, no worries, I was just hoping to increase its distance slightly.
Even if the above is not possible, thank you for releasing this!
thx for the great light ;) much more immersive/realitic than simple flashlight - try to adjust it like a real flashlight but i give up and found this one :)
i notice when you turn off the light you step a bit back.
i change the 'turn off' sound same to the 'turn on' sound .. for me its sounds better.
question: why is the light purple (i like it) and will there an option for change the color or maybe some variants
keep up the great work .. greetings
Otherwise, a neat trick spawning a light like that. I'm surprised you couldn't just parent the transforms somehow so you wouldn't need to manually update the entity yourself, and only concern with creation and deactivation of the lightsource.
If we could somehow make the object we create a part of the weapon, the game engine itself would take care of the positioning. But as far as I know there is no way to do that.
Thanks for the comment anyway :D