making a flashlight for jk3 -1 reply

  • 1
  • 2

Please wait...

leonkennedy4011

the-pink-herb-side

50 XP

18th October 2007

0 Uploads

114 Posts

0 Threads

#1 10 years ago

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.




Innocent Hawk

Not so innocent?

50 XP

18th July 2005

0 Uploads

207 Posts

0 Threads

#2 10 years ago

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.




leonkennedy4011

the-pink-herb-side

50 XP

18th October 2007

0 Uploads

114 Posts

0 Threads

#3 10 years ago

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




Guest

I didn't make it!

0 XP

 
#4 10 years ago

there is a mod that will be released soon called man hunt, this mod has the flashlight feature, manhuntmod.tk




Guest

I didn't make it!

0 XP

 
#5 10 years ago

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.




leonkennedy4011

the-pink-herb-side

50 XP

18th October 2007

0 Uploads

114 Posts

0 Threads

#6 10 years ago

ok thank you ill try that.




TFOpanda

Modder

50 XP

29th January 2006

0 Uploads

128 Posts

0 Threads

#7 10 years ago

Code3Arena

shot0026bj5.th.jpg

[COLOR=Black] I used it in man hunt. Works okay, but it's generally the engine that holds back the dynamic lighting. [/COLOR]




leonkennedy4011

the-pink-herb-side

50 XP

18th October 2007

0 Uploads

114 Posts

0 Threads

#8 10 years ago

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?




Sgt. Sev3n

Don't f*ck with the family.

50 XP

26th March 2008

0 Uploads

252 Posts

0 Threads

#9 10 years ago

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.




leonkennedy4011

the-pink-herb-side

50 XP

18th October 2007

0 Uploads

114 Posts

0 Threads

#10 10 years ago

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?




  • 1
  • 2