Left 4 Dead 2

Left 4 Dead 2

249 次評價
Infected can disarm survivors
   
獎勵
加入最愛
已加入最愛
移除最愛
Game Content: Scripts
Game Modes: Single Player, Co-op
檔案大小
發佈於
6.747 KB
2024 年 12 月 30 日 下午 6:18
1 項更新註記 (檢視)

訂閱以下載
Infected can disarm survivors

描述
This cusomisable mod lets the infected knock a survivors weapon to the ground if they hit them.

The CFG file in "ems\infected_disarm\disarm.txt" lets you edit 3 variables. You can change how likely an infected is to disarm a survivor when the survivor has high health, low health, and how much health is needed to be considered 'low health'. Using this, you can make injured survivors more likely to drop their weapons.
43 則留言
ponds34 8 月 3 日 上午 11:38 
You should add a setting to allow only special infected or common infected to disarm you, Its cool to have a tank disarm me whereas its annoying to lose my gun in the middle of a horde with nothing but a pistol to kill them
Geebanger0  [作者] 7 月 10 日 上午 3:41 
Ellis doesn't get stumbled there, he just runs away
withextradip 7 月 10 日 上午 12:12 
You should make the survivors stumble when they drop a weapon, similar to the video
rgawsome231 7 月 9 日 下午 6:21 
@Geebanger0

Many thanks for the explanation, I hope you have a fantastic night and good fortune on future projects!
Geebanger0  [作者] 7 月 9 日 上午 12:02 
If you get an error, it means that at some point during this the script failed. So long as it still otherwise works though, it's fine. Almost every script I make produces errors in console constantly. I don't know how/can't be bothered to make them in such a way that they don't produce the errors. The scripts still work perfectly fine otherwise, and most people don't check the console at all so they won't even know.

So yeah, unless the script doesn't work, you don't have to worry about the errors.
Geebanger0  [作者] 7 月 8 日 下午 11:59 
The function basically means this

When a player takes damage:
- Check which player it was who took the damage
- Check what damage type that player took. Every damage type has a corresponding number
- If the damage type equals 128 (which it should if a common infected hit the player):
-- Continue with the rest of the script
rgawsome231 7 月 8 日 下午 8:34 
Hey I don't know if you still watch over this mod but on line 117 to 122 which is this:

function OnGameEvent_player_hurt(event)
{
local victim = GetPlayerFromUserID(event.userid);
local damagetype = event.type;
if(damagetype == 128)

I think this is what causes error problems on my computer, as in the console it show it as "type is not a valid" something of this sort. I was wondering if you can explain what this function does and maybe review it to see if it happens on your end too.

Thank you for your time! :-3
Corveck (Fusion) 6 月 20 日 下午 10:42 
@an apocalypse fae It's not like anyone's asking you to download this lol
an apocalypse fae 6 月 16 日 下午 1:54 
i'd like to keep my reserve ammo :/
kouga 5 月 29 日 下午 11:19 
is it possible to add a variable in the cfg to blacklist what weapons can be dropped?