View Single Post
Author Message
DarkNoghri
Member
Join Date: Mar 2009
Old 01-18-2010 , 21:36   [L4D2] Tank-on-fire Speed Booster
Reply With Quote #1

This plugin is to help buff the tank in versus gameplay. In campaign mode (at least in L4D), the tank always got a speed buff when he was set on fire. It gave you a choice when playing against a tank. Do we light the tank on fire? He burns out in 30 seconds or so, but now he can catch us. This plugin is so that hopefully, this situation is no longer strictly win-win for the survivors in versus.

This is as requested over here.

Thanks to Downtown1 and AtomicStryker, who's code I heavily used for reference (and may have borrowed). Thanks also to Dirka_Dirka.

Cvars:
l4d2_tankfire_boost_enable: 1 by default, enables plugin.
l4d2_tankfire_boost_amount: 1.15 by default. This is a multiplier used on the default tank speed. So at 1.15, he should move 15% faster. Valid range is .5-2.0.
l4d2_tankfire_warning_enable- Defaults to 0. Setting this to 1 displays a warning message when the first tank per map/round gets set on fire.
l4d2_tankfire_damage_amount- Defaults to 0. Setting this to 1-15 sets the amount of extra damage the tank does while on fire. Setting it to 0 turns off the extra damage.

Changelog:
v1- Initial Release
v1.01- Tentative multi-tank support. Also, complete rewrite.
v1.02- Fixed round-end debug error (I think). Also, made disabling by cvar take effect immediately.
v1.02a- It works again?
v1.02b- Fixed minor error.
v1.03- Complete rewrite (with layout liberally borrowed from AtomicStryker's water brake), and hopefully performance increases.
v1.04a- Added coop enable, warnings, and extra fire damage. Lowered default speed boost to 15%.
v1.1- Thanks to Dirka_Dirka, code has gone through a thorough revamp, and (hopefully) should behave better if enabled/disabled. The plugin is now enabled in all gamemodes. If you want it disabled in some modes, see here.

Notes:
This should work in L4D, as all events exist there as well.
I'm rehooking player_hurt for the extra fire damage on tank punches. Please let me know if there are performance hits.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_tankonfire.sp - 9169 views - 9.7 KB)

Last edited by DarkNoghri; 05-22-2010 at 23:18.
DarkNoghri is offline