• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

KF Torch/flashlight?

PrometheusTitan

Grizzled Veteran
Nov 11, 2013
77
1
I was wondering how you would go about creating this.

I can model and animate a simple flashlight and put it into KF. My question is the coding.

I have looked at the 9mm and the Shotgun which both have the flashlight attachments, but honestly, I can't see a way to parse just the flashlight code away from the shooting side of things.

All I'd like is a simple flashlight that you can hold and maybe bash on some specimens heads. Is there a way to do this?

Thank you
 
Of course this is possible and you personally said what you should be doing. You'll have to look at the 9mm/Shotgun (weapon with a torchlight already) and use that code to decipher what is needed.

Few things i'll advise for this type. Make it a "melee" weapon by having the Fire0 be a melee attack. Make it that the Fire1 (technically alt-fire) toggle the On/Off of the torch with the exact intention as the semi-auto/full-auto or on/off for the torchlight on other weapons. DO remember there is a few bools you may need to check and the code you want is within the main weapon class, attachment class and the fire class (depending on how you code it as a toggle or seperate fire itself). I will advise doing a toggle.

See how you go and if you run into any problems, pop on here with what you have done and some code. We'll be glad to help :)
 
Upvote 0