Left 4 Dead 2

Left 4 Dead 2

Melee critical strike
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