Twitch Weaponry (CS:S)

Twitch Weaponry allows you to fight in a more cinematic fashion. Real people don’t weld their rifles to their eye sockets; with a Twitch weapon, you can enter an aim mode that gives you more freedom to move around your weapon.

UPDATE:

New version released.

http://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0002-2.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0005-2.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0001-1.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0035-1.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0001-2.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0047.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_gm_construct0006-2.jpg

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

**Q: Where do I activate the new features, for example the slowmo when in aim mode?
A: Q Menu -> Options tab -> Addons -> Twitch Weaponry. Shown in this picture.

Q: What do I need to do to activate slowmo?
A: Enable slowmo while aiming, with the menu described and shown above. Then in console activate cheats (type ‘sv_cheats 1’). Then you will enter slowmo whenever you right-click to aim your weapon.**

Sequel to Twitch Weaponry, a greatly improved now 20-weapon pack. With Twitch Weaponry, holding right-click enters an aim mode, in which you can aim more precisely and move your crosshair a certain distance from the centre of the screen. The weapon’s model, as well as realigning to a less passive position when you aim, moves to point at where you are aiming, and transitions between aiming and not aiming are rapid yet smooth. The weapons have recoil, which can be reduced by crouching. Flashlights follow where you aim your weapon, making encounters in the dark more dramatic. The new version adds stability fixes, 12 new weapons (including 5 faithful part-replicas of HL2 weapons), additional customisation options (that can be changed in their own options entry) and a ‘slowmo’ feature for singleplayer games.

SOME OF THE OLD POST:

The Twitch P90 and Twitch Glock in action:

[media]http://www.youtube.com/watch?v=0TFmd-DmNBw

From left to right: AK47, Deagle, Glock, M249, M3, M4, MP5, P90, USP

http://i16.photobucket.com/albums/b35/Devenger/th_twitch_ak47.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_deagle.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_glock.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_m249.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_m3.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_m4.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_mp5.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_p90.jpghttp://i16.photobucket.com/albums/b35/Devenger/th_twitch_usp.jpg

(Infinite swarms of Combine provided by NPC Spawn Platforms.)

Download:

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

Extract to garrysmod/garrysmod/addons.

(Yes, this is an update on the Stationary Aim weapons I released a while ago, and was lost by garrysmod.org somehow. But it’s a significant update, and the old name was silly.)

Please leave feedback in this thread. Thank you for your interest.

Additionally, if you wish to use the weapon base or any of the weapons themselves for one of your own projects, you may do so without contacting me, as long as you provide sufficient credit. (The technology is pretty simple, so if it can be any use, I’d rather it be used than pointlessly reinvented.)

Dude, that’s fucking awesome. Downloading.

Nice job. Got my download.

Amazing. Been waiting for a pack like this to come out, great job.

Excellent job. There’s a few things I have to say about this weapon pack, and suggestions for improvements in later versions.

-Semi-automatic handguns tend to feel much more comfortable and natural to use with this sort of aiming. I’m not sure why, but automatics just feel a bit odd. I think it’s because of the lack of view recoil when twitch-firing automatics. I would advise you to set the rest of the handguns from Counter-Strike: Source to this base, they’re very fun to use. The stationary aiming seems like a cross between RE4 and Far Cry.

-When I tried something like this, one method I tried in order to improve the “feel” of it was lowering mouse sensitivity when stationary firing. However, “sensitivity” is a protected ConCommand, so this doesn’t seem possible. If you can find any way to make twitch-aimed weapons aim “slower”, it would probably be beneficial to incoprorate it.

-The weapons’ controls are almost flawless. You deserve a medal for how well you scripted the M3’s reloading, that’s always been a problem in other weapon packs.

-The world firing animations seem really off, but this is probably a garry’s mod bug.

-The draw animations for the weapons are rushed, and there is a way to fix this. You can send a “draw” animation to the weapon during the Deploy hook, and then use SetNextPrimaryFire and other functions to “freeze” the weapon until the draw animation has finished. The length of time should be the amount of frames in the animation (you can find this in Model Viewer) divided by the FPS of the animation (you can find this in the v_models’ .qc script, or I think somewhere in Model Viewer).

-It might be wise to control whether or not the player can sprint while they’re twitch-aiming.

-Some realism advocates would prefer support for taking into account the presence or absence of a chambered round when reloading. This basically entails setting the amount of ammo in the current “clip” to the max capacity plus one, if the player reloads while there are rounds left in the previous “clip”.

-I’m not too fond of the twitch-firing crosshair. The normal one is fine, but the twitch-aiming crosshair doesn’t seem centered. Just a minor nitpick.

All in all, you’ve done a fine job on these. I’m definitely keeping them on my server.
(Hey, you forgot the Glock on your “full weapon lineup” in the OP!)

Could you collaborate with 1337N008 and make the most awesomely realistic and comfortable Sweps ever?

[editline]09:02PM[/editline]

Oh, and awesome sweps man

Now, we need a version that turns on slowmo with all pretty effects when you enter aim mode. THAT would get my download.

I think all the people making these awesome SWEP bases should collaborate and make a super awesome SWEP pack. :v:
This is extremely nice, by the way. I love this kind of aiming, it’s fun to use.

This would be awesome if you could hold it over your head and shoot (like over a wall)

Exelent work!

I posted something long in response to everything above, then the whole forum thing went down and now it’s gone. Which is frustrating. So I’ll talk about what I’ve included in the next version so far instead.

The next version has a server cvar that, in singleplayer and if sv_cheats 1 is on (uses host_timescale), activates slowmo when you enter aim mode. Colour drains from the screen, including of your crosshair, and a mild sharpen effect is applied. Your weapons make lower-pitched firing sounds, and every shot is a tracer (which looks awesome). The degree of slowmo is changeable by cvar, but is default 0.2x speed. It is excellent for feeling a bit like Max Payne.

The remaining semi-automatic pistols (P228 and Fiveseven) are in the next version, as well as some other weapons (MAC-10, TMP, UMP45, M1014). The dual elites weren’t ever going to work very well, so I decided against including them.

I’d already subtly hacked down the mouse sensitivity by measuring players’ aim changes and reducing them. I’ve added a client cvar allowing players to have a finer degree of control over what adjustment is made (default value 1, which translates to 0.5x default).

I posted something long in response to everything above, then the whole forum thing went down and now it’s gone. Which is frustrating. So I’ll talk about what I’ve included in the next version so far instead.

The next version has a server cvar that, in singleplayer and if sv_cheats 1 is on (uses host_timescale), activates slowmo when you enter aim mode. Colour drains from the screen, including of your crosshair, and a mild sharpen effect is applied. Your weapons make lower-pitched firing sounds, and every shot is a tracer (which looks awesome). The degree of slowmo is changeable by cvar, but is default 0.2x speed. It is excellent for feeling a bit like Max Payne.

In the new version, by default, weapon drawing is at CS:S speed. I’m not going around hunting frame times, so I chose 1 second, which seems to work aptly for most weapons. You can reactivate it being controlled by sv_defaultdeployspeed with a server cvar.

Done for next version, cheaply. Newly spawned weapons start with a round already chambered (e.g. newly spawned AK has 31 rounds loaded), and you don’t get the +1 round if you reload having emptied the weapon).

Next version uses a smaller version of the non-aim crosshair in aim mode, and smoothly resizes said crosshair to its new size when you enter and leave aim mode.

Additionally, there is a client cvar for hiding the HUD excluding the crosshair, a client cvar for hiding the crosshair, and a server cvar for having infinite ammo whilst in aim mode once you have only one bullet left (so you can romp through a stronghold with a MAC-10 and don’t have to have the hassle of reloading). How far the crosshair is allowed to go left and right has been increased, so you have a wider aiming range without having to move the whole camera.

I’m pretty much ready to make a new video then a release, but I’m still open to requests and suggestions.

Epic.

Viewable directly in the model viewer below the animation selections.

There’s also Entity.GetSequenceDuration( ) or some similar function, but I’ve never tried using it so I dunno.

I fell that playing the draw animation adds feeling to the weapon, just be careful because a lot of weapons have a huge gap of nothing in the animation :/.

Excellent pack.

Submited on GMod.com, wait for Anti-reject :smiley:

[editline]08:57PM[/editline]

Here you go:

Thanks a lot, although it’s a pity your enthusiasm did no favours for your spelling. :smiley:

If any garrysmod.com moderators could fix up the spelling errors on that post (particularly the title, if possible) that would be very welcome… or simply copy the description from the garrysmod.org download, which is a little clearer on the features IMO…

New version is incoming tomorrow probably, just adding stupid cvars like ‘twitch_aim_bullettime_onjump’ now. (But trust me, auto-bullettime when you are airborne is really cool!)

Can we get silencers for the weapons that support them, too?

I want HL2 and TF2 version of these.
…I don’t own CS:S. :frowning:

Do you mind if I use this idea to develop weapons of my own in my gamemode?

I’ll release a pack with some of the simple HL2 weapons alongside the next version, I’ve made a couple (Pistol and SMG) with a slightly tweaked base and they work fine. I’ll work on making one base weapon fit all, so that players can run either or both packs.

As I said in the first post, any weapon base content (the code) I would appreciate credit for. The idea itself is generic enough that you don’t need to credit anyone for the idea alone. If you want any help on the technical side (making your own base with a similar aim setup or whatever) post here or PM me and I’ll be happy to help - more good gamemodes for Garry’s Mod is something I’d love to see happen and be involved in.

Coincidentally, I’m working on a gamemode myself using this weapon tech, slowly. No promises though (my record for finishing big projects is poor at best).

This addon reminds me of Wii control aiming, and also reminds me light gun arcade games such as Time Crisis. This got my download easily.