Im not sure if this is possible or not but Is there a way to make a flashlight on your gun and have it project light? like say I made a map with a dark room is there a way to have it so when you press a key that your gun turns on a light and you could search the room? but not a light like the lightsaber where its just all around you but a more like spot light effect like a real flashlight I know that pressing a key to turn it on would most likely not be possible but is it maybe possible to just have it on when you pull out the gun? If anyone knows how to do this could you please explain it to me in detail I am not asking for a request just want to know how to do this, thank you for your time.
JA does utilize dynamic lighting, but in order to get what you would describe it would take some of altering of the game's code. Dynamic lights as they stand in the game currently (if I'm not mistaken) are radial, and not directional. You would have to program directional properties into the lighting engine for it to work.
Stationary directional lights (aka spotlights) are possible and can be used by mappers, so theoretically there could be some code that could be borrowed from there. Then you would then need to code in the light emitting property to the the weapon of choice, which when we look at the lightsaber is indeed possible. Turning the light on and off from that point would be easy. Again, the lightsaber can already do it.
thank you for replying but where would I find the code for the light source in the game, in gfx/effects ? and what exactly would the spot light and emitting codes be? Im still very new to coding so bare with me lol im used to making maps and textures so this is new
there is a mod that will be released soon called man hunt, this mod has the flashlight feature, manhuntmod.tk
Lets just say, it's not for the feint hearted, and I cannot help much at all because I don't even know how to edit source code, and it would probably take an advanced programmer to even know where to start looking for that kind of code. If you wan't to program though, start by downloading the jka sdk on the jk3 files website.
ok thank you ill try that.
[COLOR=Black] I used it in man hunt. Works okay, but it's generally the engine that holds back the dynamic lighting. [/COLOR]
thank you for that page but would that code work in jk3 or would I have to use my own? and affter I edit the source code do I put that code in the gun model to?
If I'm not mistaken that screenshot is for jk3. You could also add a cone or plane onto the gun model along with a shader edit to get something that looks like a flashlight beam but as far as I'm aware it wouldn't actually omit any light. I have seen something similar done with lasers on some other gun models.
I have done all the editing to sdk but now I dont know how to compile it to the game to make it work and I have made a sahder and a picture for it but where do I put those?