Left 4 Dead 2

Left 4 Dead 2

72 个评价
Throwable Melee Weapons Advanced (Vscript)
   
奖励
收藏
已收藏
取消收藏
Game Content: Weapons, Scripts, Miscellaneous
Game Modes: Single Player, Co-op
Weapons: Melee
文件大小
发表于
更新日期
39.548 KB
2 月 13 日 上午 11:21
6 月 3 日 上午 8:44
14 项改动说明 ( 查看 )

订阅以下载
Throwable Melee Weapons Advanced (Vscript)

在 kurochama 的 1 个合集中
Unique Weapons with Special Features
66 件物品
描述
This one is the version with a cfg file. I decided to make a new one instead, because some mechanisms have changed. So, the prototype version is still available, in case if some people prefer the prototype version. I used the same animated previews, as basically it's still the same, with only the damage mechanisms changed.

The main mechanisms are still the same. To throw melee weapon, you only need to hold RELOAD button & then press FIRE button, or simply press ZOOM button. Melee will return automatically, & the time until the melee returns can be adjusted via cfg file.

The list of features available on "throwable melee weapons.txt":
  1. Melee Throw Hit Cooldown: How long until the melee returns to the owner after a successful hit on a zombie. Default value is 1 (1 second). Min value= 0 (instant return), max value= no limit.

  2. Melee Throw Miss Cooldown: How long until the melee returns to the owner after it hits objects or misses. Default value is 5 (5 seconds). Min value= 0 (instant return), max value= no limit.

  3. Melee Damage Multiplier On Common: The damage multiplier on common infected hit with melee throw. The damage multiplier is based on target's current health. The target hit with melee throw will stumble. It's in float/ decimal. Min value= 0.01 (1% of target's current health), max= 1 (instant kill, damage is equal to target's health).

  4. Melee Damage Multiplier On Smoker: Same as above, but for Smoker.

  5. Melee Damage Multiplier On Boomer: Same as above, but for Boomer.

  6. Melee Damage Multiplier On Hunter: Same as above, but for Hunter.

  7. Melee Damage Multiplier On Spitter: Same as above, but for Spitter.

  8. Melee Damage Multiplier On Jockey: Same as above, but for Jockey.

  9. Melee Damage Multiplier On Charger: Same as above, but for Charger.

  10. Melee Damage Multiplier On Tank: Same as above, but for Tank. A special case, tank only has 20% chance to stumble.

  11. Melee Damage Multiplier On Witch: Same as above, but for Witch.

  12. Melee Area Damage Multiplier: This one is applied on common infected near the target that take shockwave damage. The damage multiplier formula is the same as above.

  13. Melee Throw Gore Mode: When enabled, common infected killed with melee throw will have parts of their body dismembered/ gibbed/ destroyed. (NOTES: This only works on default L4D2 common infected skins & common infected skin mods that support gibs)

  14. Melee Throw Glow Type: This feature controls the glow on the melee throw, whether it's from dynamic light or from the glow of the melee itself. You can set this to 0 to disable dynamic light on the melee throw.

  15. Melee Spinning Throw: When enabled, melee will spin when thrown.

  16. Melee Warp Pickup: When enabled, you can pick the thrown melee immediately by holding E (Use) key. You can also pick the melee even when climbing a ladder (but you'll lose your grips on the ladder, so you need to grab the ladder immediately when picking a melee during climbing).

  17. Temporary Pistol On Melee Throw: This is enabled by default as this is the original feature. When this is disabled, you won't get pistol after throwing melee (so your secondary slot will be empty if you have melee on secondary slot as default).

The simple mechanisms of "Throwable Melee Weapon":
  • Hold RELOAD button & then press ATTACK to throw the melee you're holding. Alternatively, you can simply press SCOPE/ ZOOM button to throw.

  • You'll temporarily get a pistol after throwing your melee. If you have a primary gun, you'll switch to primary gun instead of secondary.

  • The thrown melee will have a special dynamic light following it, so it works like flare.

  • When it successfully hits zombies (CI, SI, tank, & witch), there will be a small shockwave special effect.

  • The damage is based on damage multiplier features on the cfg file.

  • The thrown melee can destroy breakable objects. Custom bosses/ enemies in custom campaigns may be included as long as they can take damage.

  • When the thrown melee hits zombies, there's 1 second of cooldown until the melee automatically returns to the owner. This can be changed via cfg file.

  • When the thrown melee hits objects or misses, there are 5 seconds of cooldown penalty until the melee automatically returns to the owner. This can be changed via cfg file.

  • You can throw the melee at other survivor, but it will deal no damage. Instead, the survivor thrown with melee will stumble & use some voicelines to complain, or scream (don't try to throw it at Zoey or Louis, ok :D ).

  • The melee throw can bypass riot zombie's armor.

  • If you throw melee when you're hanging from the ledge or incapacitated, melee won't return. But you can use "Melee Warp Pickup" & hold E (Use) after you stand up again to pick the melee automatically, no matter how far the melee is.

  • If you throw melee while climbing, the melee won't return automatically but when using "Melee Warp Pickup", the E (Use) key can be used to pick the melee no matter how far it is. However, the moment you press E, you'll lose your grip on the ladder, so make sure to grab the ladder again after you press E to pick the melee.


Q: "Does this work on custom melee weapons?"
A: "As long as they're not custom melee weapons with special features/ powers like flamethrower, rocket launcher, Celestial Melee Weapons etc, it will work. Actually it also works on those custom melee weapons with special powers, but it would be funny to throw your flamethrower instead of using it to burn zombies, wouldn't it? Heheheheh..."


So, with this mod, you can have a semi-boomerang melee to support you as a melee wielder, so you can also deal long range even without pistols.


NOTES:
  • Damage multiplier features can be set above 1, but it's better to set it to 1 max, because setting the value to 1 is already equal to instant kill on hit.
  • A secret feature: If you set "Melee Throw Miss Cooldown" to high value & then pick the melee manually, you'll get a "One-Time-Protection Flare" in melee range that makes you a glowing survivor & the flare deals damage to any zombies coming close to you in melee range. This also works on special infected's abilities that pin a survivor.
  • A known bug: If you use SCOPE/ ZOOM to throw the melee, the melee will be thrown farther than when using RELOAD + FIRE, as if it's thrown with lower gravity (no idea how this could happen, as the throw mechanisms are actually the same, with only different keys to press).
  • This can't be used together with "Melee Sharpshooting" mod, as this also uses SCOPE/ ZOOM button to throw melee.
  • If you prefer the old version, you can go here: Throwable Melee Weapons (Prototype)
114 条留言
kouga 12 月 4 日 上午 9:36 
do you mean place AddThinkToEnt(entity, null); on "weapon_drop" event? since you suggested that i try deleting item pickup, and entity.ValidateScriptScope() only exists on "weapon_drop"
kouga 12 月 4 日 上午 5:16 
@kurochama, i made an attempt earlier which i sent to you on our chat.
kurochama  [作者] 12 月 4 日 上午 3:12 
@ kouga , The original when I made the "Prototype" very first version without the cfg file & used the "Scope + Fire" combo keys, the melee was thrown normally without low gravity. The clue might lie on "item_pickup", because back then I only used "weapon_fire" for the combo keys to drop melee, & "weapon_drop" to add the think function on the dropped melee. "item_pickup" was added later when the client who first proposed the throwable melee idea asked to make it only "Scope" button to throw instead of "Scope + Fire". You can try to completely delete the "item_pickup" & see if that removes the low gravity throw.
As for where to put the "AddThinkToEnt(entity, null)", on "item_pickup", right below "entity.ValidateScriptScope()" & above "local entity_entityscript = entity.GetScriptScope()", try to add that "AddThinkToEnt(entity, null)".
kouga 12 月 3 日 下午 10:32 
also what do you mean by put on top of the main scripts?
kouga 12 月 3 日 下午 9:41 
@kurochama, so youre saying that i can remove melee miss cooldown, but it wont get rid of the secret feature unless i also reset the think function on "item_pickup" ?

also, maybe the low gravity bug is caused by some other issue if the original version didnt have it.
kurochama  [作者] 12 月 3 日 下午 8:56 
@ kouga , no. Melee miss cooldown is also one of factors that trigger that secret feature. Probably one of simple ways to remove the secret feature is by resetting the Think function by adding a line like this when picking a melee on "item_pickup" event function: AddThinkToEnt(entity, null)
But that one must be put on top of the main scripts for the throwable melee.
As for the reason why it becomes a low gravity, actually the original version didn't have that problem even with "Scope + Fire" combo keys. I also have no idea about why that happened in your case, because from my experience that low gravity throw happens only when throwing using a timer/ think function, while throwing using event functions like "weapon_fire" etc normally won't cause the low gravity throw.
kouga 12 月 3 日 下午 7:57 
@kurochama i see, thank you for clearing that up. ive been using this mod for so long that i got too familiar and overlooked something so obvious :steamhappy:

in that case, is there something i can do to my version to fix both the secret feature and low gravity bug? if i were to remove the melee miss cooldown will that also fix the secret feature?

and also im so confused as to why using Scope + Fire would cause it to be thrown in low gravity. thats so odd...
kurochama  [作者] 12 月 3 日 上午 11:30 
@kouga , if that's the effect, I think it's already mentioned on my "Notes" on the description, like: A secret feature . I just never thought that the feature still works until now :steamhappy: . So, this secret feature can be a double-edged sword, like if some special infected except charger (charger should be immune to stumble when charging) pins you when you're in the effect buff, the debris effect will be triggered & special infected will stumble & take damage from the melee.
kouga 12 月 3 日 上午 1:25 
@kurochama, im away rn so i cant make a recording but i did manage to find a way to reproduce the bug:

- spam attack key (not sure if necessary step?)
- throw melee
- pick it up
- walk to a survivor or infected
- debris particle and stun effect will suddenly spawn beneath you as soon as you touch them

for reference im using settings from my aim to throw version :steamhappy:
kouga 12 月 1 日 上午 3:36 
@kurochama,

1) i see, thats the unfortunate thing because i quite like the effect of melees spinning and not just launching in the air frozen in place. are you able to provide a fix for that by detecting if the melee has touched the ground already?

1.a) i do also notice that the position of the thrown melee in the air is one where its widest surface area faces the player & the target. meaning for some melees like the sharp ones it doesnt look like it actually lands by the sharpest side first but rather the flat side.

1.b) the tank rock particle is a little too over the top, maybe replace it with a charger wall slam particle if possible?

2) ill try to get a recording of it when im available :) thank you