Raised This Month: $32 Target: $400
 8% 

[L4D2] Survivors can draw guns while on a ladder


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mel Ennial
Junior Member
Join Date: Feb 2018
Plugin ID:
6044
Plugin Version:
2c
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Survivors can pull out their guns while on a ladder by pressing 'e'.
    Old 03-04-2018 , 10:06   [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #1

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_ladderguns_v2c.sp - 2568 views - 4.9 KB)

    Last edited by Mel Ennial; 03-13-2018 at 14:32.
    Mel Ennial is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Chocolate Factory
    Old 03-04-2018 , 22:20   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #2

    Sweet! Finally, Windows users get to feel what Linux users have.

    One quick question, tho, I saw the source code and I was wondering why change their move type to MOVETYPE_WALK instead of reverting back to MOVETYPE_LADDER when they use their guns?

    Other than that,
    cravenge is offline
    Mel Ennial
    Junior Member
    Join Date: Feb 2018
    Old 03-05-2018 , 06:35   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #3

    Quote:
    Originally Posted by cravenge View Post
    Sweet! Finally, Windows users get to feel what Linux users have.

    One quick question, tho, I saw the source code and I was wondering why change their move type to MOVETYPE_WALK instead of reverting back to MOVETYPE_LADDER when they use their guns?

    Other than that,
    In all honesty? I'm not confident about the quality of my testing, and MOVETYPE_WALK seems safer in case there's something I missed. I'm thinking of being caught by an SI on the ladder or somesuch, but a specific SI in a specific situation might not properly reset a victim's movetype. A similar sort of thing to jockeys not triggering the ability_use event.

    Last edited by Mel Ennial; 03-05-2018 at 06:42.
    Mel Ennial is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Chocolate Factory
    Old 03-05-2018 , 08:46   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #4

    Quote:
    Originally Posted by Mel Ennial View Post
    [...]
    Well said!

    I tested it and it works fine atm.
    cravenge is offline
    edwinvega86
    Senior Member
    Join Date: Feb 2016
    Old 03-05-2018 , 22:53   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #5

    when climbing and standing still on the stairs the animation does not stop. good complement
    edwinvega86 is offline
    Mel Ennial
    Junior Member
    Join Date: Feb 2018
    Old 03-07-2018 , 06:29   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #6

    Quote:
    Originally Posted by edwinvega86 View Post
    when climbing and standing still on the stairs the animation does not stop. good complement
    Thanks.

    The weird animation bug where Bill climbs a ladder - while actually being completely still - is something that happens regardless of this plugin. I loaded the game up with no plugins other than the standard set, and Bill still does his thing. Sorry man. I put it in the same category as Zoey straight up missing certain melee animations (like crowbar) and Coach freaking out when crouching with a magnum. Maybe someone on the Workshop has fixed the animation?
    Mel Ennial is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Chocolate Factory
    Old 03-07-2018 , 08:16   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #7

    [L4D2] Survivor Animation Fix plugin by Deathchaos or [L4D2] Improved L4D1 Animations addon in GameMaps.

    Take your pick if you want to fix problems regarding survivor animations. I recommend plugin rather than addon.

    Last edited by cravenge; 03-07-2018 at 08:19.
    cravenge is offline
    theproperson
    Member
    Join Date: Feb 2017
    Old 03-08-2018 , 22:48   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #8

    I'm not sure if its related to this plugin or just the way the game behaves. When climbing a ladder and pressing e to use a weapon, if a common jumps on top of me then I stop being able to use my weapon
    and end up being stuck until dropping off the ladder. Is there a work around to this?
    theproperson is offline
    Mel Ennial
    Junior Member
    Join Date: Feb 2018
    Old 03-09-2018 , 08:25   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #9

    Quote:
    Originally Posted by cravenge View Post
    [L4D2] Survivor Animation Fix plugin by Deathchaos or [L4D2] Improved L4D1 Animations addon in GameMaps.

    Take your pick if you want to fix problems regarding survivor animations. I recommend plugin rather than addon.
    Neat, I'd assumed this was something that could only be fixed via tweaking the actual models, so I never even looked for a plugin to solve it. Sweet!

    Quote:
    Originally Posted by theproperson
    I'm not sure if its related to this plugin or just the way the game behaves. When climbing a ladder and pressing e to use a weapon, if a common jumps on top of me then I stop being able to use my weapon
    and end up being stuck until dropping off the ladder. Is there a work around to this?
    I'll try and replicate this problem. When I do, I'll edit this post, hopefully with a fix of some kind.

    Edit: I haven't had much luck recreating this. I've had commons push me up/down the ladder, but so far I've not got stuck. On another note, I've got automatic ladder-gunning working to an extent; the player still has to be still on the ladder, but apart from that there's no button-press required. New version is in the original post.

    Last edited by Mel Ennial; 03-09-2018 at 13:26.
    Mel Ennial is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 03-09-2018 , 08:51   Re: [L4D2] Survivors can draw guns while on a ladder
    Reply With Quote #10

    Quote:
    Originally Posted by theproperson View Post
    I'm not sure if its related to this plugin or just the way the game behaves. When climbing a ladder and pressing e to use a weapon, if a common jumps on top of me then I stop being able to use my weapon
    and end up being stuck until dropping off the ladder. Is there a work around to this?
    Sounds like classic l4d2, with or without this plugin (commons blocking your way up the ladder, etc).
    Visual77 is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 19:55.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode