Left 4 Dead 2

Left 4 Dead 2

评价数不足
Melee critical strike
   
奖励
收藏
已收藏
取消收藏
Game Content: Weapons, Scripts
Weapons: Melee
文件大小
发表于
120.631 KB
2024 年 8 月 21 日 上午 5:05
1 项改动说明 ( 查看 )

订阅以下载
Melee critical strike

描述
All MELEE weapons has 30 chance to deal 225% damage (coded as extra 115%)
Also includes crit sound

Want guns to crit too ? check out https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3313569540

Made following a request by LE37
Took longer to make than I thought

Let me know in the comments if this is too strong

LOCAL ONLY
might conflict with scripts using game event player_hurt and infected_hurt

Have fun

EDIT: marking this one as won't fix. problems and possible solutions are in comment section. feel free to reupload with your own fix
8 条留言
EVIL_SUPRESOR 6 月 8 日 上午 7:17 
There were no corrections?
Z  [作者] 2024 年 8 月 24 日 上午 12:42 
<3
EVIL_SUPRESOR 2024 年 8 月 24 日 上午 12:20 
And it turned out great anyway! Good luck on the modding path.
Z  [作者] 2024 年 8 月 23 日 下午 11:30 
appreciate the write up, and I figured that out too on further testing after publish

here's some more problems I found:
- melee damage type doesn't deal intended crit damage, but 200 damage (tank) instead
- shotguns calculate chance per pellet, meaning crit is also dealt per pellet and not as a whole
- params.weapon is sometimes missing for unknown reasons for infected_hurt

fix would require
- using a diff damage type to correct deal damage
- restrict crit to melee only (most likely will have to use GetModelName() )

thing was made in a rush, and mostly serves as a template for ppl new to scripting like myself
EVIL_SUPRESOR 2024 年 8 月 23 日 下午 11:16 
I checked the script. Unfortunately, for some reason it works on all types of weapons (short-range and long-range types). I have one script with crit for two guns (SIG and MP5), but they are fine. I'll even say more: they have their own critical hit that works independently of yours. I also got into your code and... I am not a super-creator of mods for Left 4 Dead, but even I was able to deduce the assumption that in the stanza of the type of damage source (where the weapon class is indicated), clarity for the code is needed, most likely, I think. But otherwise I liked the mod. Great job, friend!
Z  [作者] 2024 年 8 月 21 日 上午 6:49 
also just to let you know it's possible to make just 1 weapon do crit, because I think I know what you're gonna make
LE37 2024 年 8 月 21 日 上午 5:36 
ok:steamhappy: wait a moment I will upload a new item about dota2