Left 4 Dead 2

Left 4 Dead 2

63 ratings
Anti Troll Medkits
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
Game Modes: Co-op
Items: Medkit
File Size
Posted
11.272 KB
18 Feb @ 11:28pm
1 Change Note ( view )

Subscribe to download
Anti Troll Medkits

Description
Do you hate when a troll joins your lobby and wastes all the medkits to ruin the game for you? Or how about when your teammate rushes to the saferoom and uses all the medkits for themself even though you need to heal more than they do?

Anti Troll Medkits stops medkits from being wasted. When a player attempts to heal, the script will calculate how urgently every survivor needs to be healed. If the player being healed is determined to not be in urgent need of healing, then the medkit will fail, the healer will be staggered, and they will receive a notification in chat telling them to heal their injured teammate instead.

How does the script calculate this? That's up to you! It can be customised by editing "ems\anti_troll_medkit\priority_settings.txt". You can change a variety of factors that are considered when working out who needs to be healed, including how much health the player has, whether they have any healing items in their inventory, or if they are black and white. You can also adjust how strict or lenient the script is by changing how injured a survivor must be compared to the most injured player in order to be healed.
37 Comments
kouga 25 Apr @ 5:04am 
i see! ill pass on that then. instead, how about revisiting your infinite-use defib mod? could you make a version where its multi-use instead? (with configurable amounts of uses) that or it has a recharge time? i dont mind either way
Geebanger0  [author] 25 Apr @ 4:21am 
i havent done any work with mechanics like that, so I wouldnt know where to start. However, what I could probably do would be to have the revive duration decrease for every nearby teammate. that way it has a similar effect, even if they aren't holding e to help revive
kouga 25 Apr @ 4:03am 
hell yeah thanks a lot. actually if youre still taking requests can you make a mod where you can self-revive by holding e, + the other 3 survivors can aid in your revive? im thinking that the progress bar gets faster the more survivors revive an incapped player (that also means that self-revive should be super slow). what do you think? no worries if thats too much work
Geebanger0  [author] 25 Apr @ 3:14am 
I'll still make the other one to fix your problem with the bots :BL3Thumbsup:
kouga 25 Apr @ 3:06am 
ill take it tbh. but if there is a way to implement shove cancel in the future id like that too
Geebanger0  [author] 25 Apr @ 1:40am 
i found a potentially better solution; you can now cancel the heal by crouching and attacking with any weapon. its a bit more specific, so its a little less likely to trigger by accident, and you dont need to injure your teammate
Geebanger0  [author] 24 Apr @ 11:30pm 
@kurochama I'll give entity_shoved a try too just to see what works best
Geebanger0  [author] 24 Apr @ 11:30pm 
@kouga yes the health % will be configurable, that's easy to do and I can add an extra config option for how temporary health will be factored in
kurochama 24 Apr @ 10:51pm 
@Geebanger, there's one more alternative option that's worth a try, "entity_shoved". This one can be triggered when shoving any non-player objects (common, witch, entities), & wall & ground also count. So, you can try to use "FindByClassnameWithin" in melee radius or slightly wider to check a bot that's trying to heal the player, & once the player shove the ground, the bot will stagger.
kouga 24 Apr @ 9:41pm 
gotcha! reasonable conclusion tbh and it works enough for me. will the health % be configurable? id like the bots to only heal if im Black and White tbh