Flashlight SWEP V2

V2 of the flashlight SWEP by me. Also a super huge awesome big thanks to mrflippy for working out the battery script, and fixing most of my errors for me :).

You can just overwrite the old flashlight files:
Extract to garrysmod/garrysmod/

This is much more practical and realistic than the first one.

Use: Left click to turn on and right click to turn off. Every second it is on, it will drain 2 ‘battery’ and when it is off, it will regen 1 ‘battery’. However if you hit 0 then you have to wait for it to get enough power to turn back on (which is 5 energy (10 seconds))

This SWEP disbales the ‘f’ flashlight so I do not recommend downloading it unless you are really going to use it. Or if you want to be able to use this and the regular flashlight just delete the cl_init script under lua/weapons/flashlight.

The view model is the same, I couldn’t find anything better. I also made the world model the toolgun so it doesn’t look like you’re going to shoot someone.

If there are any bugs/suggestions post them here.

http://www.garrysmod.org/img/?t=dll&id=16212

1st post ands it’s a good thing to have

What would be cool is if you could put it on sweps or create your own sweps with the light.

Pretty neat.

Gold star but this just toggles the owner’s flashlight, would have been cooler if the light was bigger and custom-coded. Still, interesting idea and implementation. If the model was different this could be used in Roleplay or something.

It is coded, there is no way to make the flashlight bigger, the model doesn’t matter at all, and it does more than just toggle the light.

The new version works fine, except for the battery power, it doesn’t reload.
It just says “Timer Error: attempt to call a nil value” in the console and does nothing. :confused:

Good. Now code a shader for it and make it cast stencil buffer shadows.

Just kidding.
:v:

It doesn’t work1? I’ll check it tout when I get back home, I’m in vermont.

I don’t see why you aren’t using the w_model. It’s just the Doom 3 flashlight and I know it has a w_model because I’ve seen it, and they have Co-op that shows it in peoples hands. What’s wrong with the v_model?

Well I didn’t decompile it, so if you want to get it I’ll take it :slight_smile:

The Doom model pack had it I’m sure.

Didn’t know there was a model pack.

Do you get shadows?

I think you should remove the shining light from the model because it looks weird when you are holding it with it turned off. Also if you could, it would be nice if you could make it so you had this when you spawned, since it disables the “f button” flashlight.

Nice two year bump there! Seriously I don’t think the OP cares anymore. Try PMing him instead… (I use this often and agree with your complaints)

Nice swep.

Dang…Didn’t think to look at the dates. Sorry about Bumping. Anyway, I will try to PM him…

This should be really good for gamemodes.

I would like to suggest a version that will work with mods.