A mutator that replaces flashlights and searchlights with versions that follow where your weapon is pointing.
Normal flashlights and searchlights are replaced with cone light versions that originate from your first person weapon model. The normal flashlight also has a life span about 3 times longer than default.
Only set up to work with the arsenal from Unreal, RTNP, and 227j. It does have custom weapon support, but the weapon itself would need a set of variables to do so. Any unsupported weapons will just result in the flashlight originating from your player.
As of 1.1 it now supports any weapon using any of the vanilla weapon meshes, this means that if your weapon is using the mesh of (for example) the automag, it will be supported without any further modification needed.
Doesn't (currently) work online, I'll have to look into replication when I get the chance.
Major thanks to Bleeder91 for helping me, and Shivaxi for letting me base this off of the RLCoopS flashlight code.
How to install: Just unzip it and drop the .u file and the .int file into your System folder. When starting a new game you should see it listed as a mutator.
How to add support for a weapon: In essence the way the system works is that on your animated vertex mesh, there's a vertex where the flashlight is attached to, and there's a vertex that the flashlight faces directly away from. In order to get the best results, you want to have your two vertexes on as straight a line as possible, on a single piece of your mesh.
In UnrealEd, add the integer variables FlashVert, and StockVert to your weapon. Open your weapon mesh in the mesh viewer and press show bones to see how your vertexes are numbered. Find a suitable vertex on the front of your weapon and set FlashVert to that vertex. Find another suitable vertex behind FlashVert and set StockVert to that vertex. Try to find as straight a line as possible and keep StockVert behind FlashVert.
Custom Rotation: With 1.1 you can now give a weapon a custom rotation, so if a weapon mesh is angled strangely (say the eightball for example) you can now rotate the flashlight. Unfortunately I couldn't get it working with real rotators in the weapon, so instead you'll have to create 3 integer variables. WMLPitch, WMLRoll, and WMLYaw. These function as you would expect, although if you aren't familiar with Unreal be aware, these should be in Unreal Units and not degrees or radians.
2pi = 360 degrees = 65535 unreal rotation units
Does this work with Unreal Evolution?
Depends, if it uses the default unreal weapon models then it should.
If not, you could either ask the mod author, or edit the weapons yourself using the custom weapon guide in the description.
This comment is currently awaiting admin approval, join now to view.