Left 4 Dead 2

Left 4 Dead 2

43 ratings
|VScript] Keep the last weapon
   
Award
Favorite
Favorited
Unfavorite
Survivors: Survivors
Game Content: Weapons, Items, Scripts
File Size
Posted
Updated
7.306 KB
11 Nov, 2024 @ 8:39am
22 Feb @ 8:21am
15 Change Notes ( view )

Subscribe to download
|VScript] Keep the last weapon

Description
I didn't really understand why Valve forced the player to use their primary weapon after certain actions in this game.
I don't know if there's a reason, but for me, it doesn't suit me.

• Keep the last weapon used (or items) when throwing a grenade or when you are saved, after healing, give or take pills or adrenaline... and retrieve the last selected item/weapon.
• The addon also allows you to keep carryables (gascan, propane, oxygen, gnome, cola) when a player (troll) gives you pills or an adrenaline dose (or others items).
• Also allows you to no longer be interrupted when deploying (medikit / defibrillator / rescuing a player hanging in the air / ammo pack / activating generators, etc) and when a player (troll) gives you item.

Example 1
You are equipped with the melee weapon, you heal yourself with the pills or the medikit
-> You find your melee weapon after the healing

Example 2
You are equipped with a grenade, you are injured and saved
-> You find your grenade after the rescue

Example 3
You are equipped with a grenade, you heal a teammate
-> You find your grenade after the healing

Example 4
You are equipped with a medikit, you throw one or more grenades
(another addon that I use allows you to have 3 for example)
-> You find your medikit after the throws

Example 5
You are equipped with a melee weapon, then a medikit, then you throw a grenade
-> You find your medikit after the throw, then you find your melee weapon after the healing

Example 6
You equip the melee weapon and then fill the reservoir
-> You find the melee weapon after filling it


Thanks to @kurochama for his invaluable help!
7 Comments
kouga 2 Jun @ 10:02am 
oh! thanks for the correction! props to @[FR] Lea!!....and i see, well it was worth asking for anyways. i just thought it would be neat to have to manually switch when you run out of ammo. no matter
kurochama  [author] 2 Jun @ 9:35am 
@Kouga , the author is "[FR] Lea". I just helped during the discussion about the making of this mod. As for that request about switching gun, probably it would be more complicated than normal forced switch when weapons still have ammo, because the weapon switch when ammo hits 0 is controlled by L4D2 default mechanisms.
kouga 2 Jun @ 9:00am 
works fantastic @kurochama! this makes me wonder actually if its possible to make a mod that prevents you from switching away from your gun if it runs out of ammo?
Dvpweb (FR)  [author] 26 Mar @ 7:29am 
Damn! I've never had this bug, yet I always play with the addon; I think I've already noticed it.
This could also be caused by another conflicting addon...
My addon only restores the last item used; it doesn't really interact with the throwing actions.
まきかま 25 Mar @ 6:40am 
There seems to be a bug where the grenade throw motion gets canceled, preventing the grenade from being thrown. This does not occur 100% of the time but happens occasionally.
TeusPLAY 9 Jan @ 2:13pm 
I love it. Thank you!
R3ViTALiZED 12 Nov, 2024 @ 6:35am 
This is quite clever, I like it.