Quick damage type info (TF2)
Figured I leave this for those looking for it, but no answers showing up for them in searches...
--- While not defined clearly in the include file (sdkhooks), you can use the damage types with TF2 once you know which is which. For example, "DMG_SLASH" is used in bleed damage. In this case you'd typically have the flags 100 (or 4 as an integer). Of course, you should just use DMG_SLASH instead of a hard coded number. To find out quickly find what the damage is, you can use something like: PHP Code:
Code:
00000000000100000000000000001000 (1048584)To make the rest of your life easier, once you know the types you need to can have something like: PHP Code:
|
Re: Quick damage type info (TF2)
Just a fact: Afterburn in TF2 CAN NOT CRIT it can only MINICRIT same with sentries. So afterburn doing CRIT damage is actually afterburn doing MINICRIT damage(the crit define is for both crith + minicrit)
|
Re: Quick damage type info (TF2)
Never tested to see if a sentry can crit or mini crit, but I know that you can increase the fire rate with a buff banner condition on the engi. Without modding weapons, you can't do crit afterburn, but do you mean it will actually turn into a mini crit if you did?
|
Re: Quick damage type info (TF2)
btw, don't use that example to force crits on or off... that's what TF2_CalcIsAttackCritical is for.
Now, talking about crits is a good time to mention SM 1.7's SDKHook_OnTakeDamageAlive. Its damage argument is post-minicrit/post-crit/post-random spread, which makes it extremely useful if you want to find out if it would kill a player or not and block if it does. It also has a corresponding SDKHook_OnTakeDamageAlivePost. |
Re: Quick damage type info (TF2)
Quote:
|
Re: Quick damage type info (TF2)
Quote:
Quote:
|
Re: Quick damage type info (TF2)
Sentries can only minicrit. Same with telefrags. Dunno about afterburn or bleed.
Sdkhooks_Takedamage dealt damage will be 1.35x with minicrits buffs, so you can /= 1.35 if the player is in one of the minicrit TFCond's. I don't think that type of damage can become a full crit unless you add DMG_CRIT to the flags. Slag Gaming had this in Advanced Weaponiser... I don't really use it yet tho. PHP Code:
Here's some vaccinator stuff I use. You can change the macros to normal functions if you want. PHP Code:
|
Re: Quick damage type info (TF2)
Chdata, you TF_DMG_CRIT is useless for this reason:
in sdkhooks.inc: PHP Code:
|
Re: Quick damage type info (TF2)
Quote:
|
Re: Quick damage type info (TF2)
Quote:
For two, mixing the two methods will result in one of them not working as the other will override it. Anyway, SM 1.7 has come out since this thread started. SM 1.7 has a new hook type in SDKHooks: SDKHook_OnTakeDamageAlive (and SDKHook_OnTakeDamageAlivePost). While this is likely too late to change the damagetype from being a crit/mini-crit (crit/mini-crit damage calculations have already happened), it will give you the real damage the player is about to take / has taken. Of course, since this is a pre hook, you can adjust the damage taken here. |
| All times are GMT -4. The time now is 18:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.