Left 4 Dead 2

Left 4 Dead 2

Melee critical strike
8 kommentarer
EVIL_SUPRESOR 8. juni kl. 7:17 
There were no corrections?
Z  [ophavsmand] 24. aug. 2024 kl. 0:42 
<3
EVIL_SUPRESOR 24. aug. 2024 kl. 0:20 
And it turned out great anyway! Good luck on the modding path.
Z  [ophavsmand] 23. aug. 2024 kl. 23: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 23. aug. 2024 kl. 23: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  [ophavsmand] 21. aug. 2024 kl. 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 21. aug. 2024 kl. 5:36 
ok:steamhappy: wait a moment I will upload a new item about dota2