The default version of co-op is fun for a while, right? Then you might start to get bored with the limited amount of special infected around at any one time. You find a way to up the tempo, either by having them constantly respawning or by bypassing the two-at-a-time limit. Then at some point, you come to a tall ladder with a thousand AI jockeys stuck at the top and you realise: ladders are now a death sentence.
I tried looking for something to alleviate this, but could only find
this thread by V1SoR. I'm sure it's much better than my meagre offering, but it requires Linux. I do not have Linux. So I made my own, extremely basic, version that should work across all operating systems. This plugin is so straightforward that I wouldn't be surprised if it actually worked for lots of games; I have tested this plugin, and will only test this plugin, in L4D2, though.
Changelog:
v1 - initial release. Only manual mode included.
v2 - automatic mode; survivors pull out guns when they stop on a ladder.
- cvars; a cvar to show current version, and a cvar to change laddergun mode (0 = disabled, 1 = manual, 2 = auto).
- now uses a .cfg (ladderguns.cfg) to store your preferred plugin mode.
- plugin now won't load unless the game is L4D2.
- plugin info now exists.
v2a, b - Cravenge's fix for the tank-related bug reported by MasterMind420. Thanks, guys.
c - No more need for the kludge, Cravenge solved my problem; I didn't realise we just go ahead and declare a MoveType variable instead of an int. D'oh.
CVars:
ladderguns_version will show you which version you're currently running.
ladderguns_mode changes how the plugin functions. 0 = disable plugin. 1 (default) = manual mode, press +use on a ladder to draw guns. 2 = auto mode, survivors draw their weapons when they stop moving on a ladder.
How to use:
ladderguns_mode 1: (default)
If a survivor is on a ladder, they can press their "use" key ("e" by default) and they will pull out their guns. They are able to use any of their items, from guns to first-aid kits. As soon as they try to move up or down the ladder, though, they will revert to normal climbing-up-ladder mode. Note: you will drop any of the prop_physics items (fireworks, petrol can, gnome, etc.) if you do this.
ladderguns_mode 2:
If a survivor is on a ladder and they stop moving, they should draw their guns automatically. That's it.
Credits:
I used thecount's code from
here to detect movement in this plugin. Thanks!
Cheers to Cravenge for the advice and support; some of the code they've posted in this thread is in the plugin.
Also thanks to Silver, who suggested I put in the plugin info and game check; I used the code from their own (excellent)
Fireworks plugin for this. I hope that's not too cheeky...
Installation:
You can either download the .smx directly or compile it from l4d2_ladderguns_v2c.sp. Once you have "l4d2_ladderguns_v2c.smx", place it into your Sourcemod's plugins folder. For example, if you have Steam installed on the C: drive, this might be "C:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\plugins".
"l4d2_ladderguns.cfg" will be generated by this plugin after you run it for the first time. If you always want auto-mode on, go to where your config files are - this will be something along the lines of "C:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\cfg\sourcemod\" - and change the value of ladderguns_mode to 2. To disable the plugin, use a value of 0 in this .cfg, or type "ladderguns_mode 0" in the in-game console.