AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get damage to armor (https://forums.alliedmods.net/showthread.php?t=28690)

ZeaLot 05-20-2006 13:45

Get damage to armor
 
Hello, the basic problem is this:

I want to get the damage done to armor when someone gets hit. According to documentation I know 2 ways how to capture it:
Damage event (via register_event)
Damage message (via register_message)

In both cases, when my function gets called, the first argument, as I understand, is supposed to be the damage done to armor, and the second is the damage done to health.

Everything works fine with health. However, the armor variable is always 0. Is it a bug? Or have I missed something?

Wanted to pratice some CS to improve my skill. So figured to use the Headshot plugin, but didn't like it because it doesn't show the damage received which is NOT a headshot. Perhaps I'm trying to re-invent a bicycle by writing the plugin myself and there is already such a plugin available? :) [Couldn't find one :P]

SubStream 05-21-2006 16:37

im pretty sure you are correct that there aren't many if any variations of the headshot plugin

Hawk552 05-21-2006 16:39

If you knew the calculation to get damage to armor then you could extrapolate it based on damage to health and where it hit, but I don't think that's really a good idea since it would take forever and probably be inaccurate.

Identity 03-15-2007 21:22

Re: Get damage to armor
 
Someone knows how?
Quote:

to get the damage done to armor when someone gets hit.

Hawk552 03-15-2007 22:39

Re: Get damage to armor
 
Yeah, check the "Damage" event:
http://wiki.tcwonline.org/index.php/..._Events#Damage

It's the DamageSave parameter.

Identity 03-15-2007 23:00

Re: Get damage to armor
 
DamageSave is always 0.

JoshGomez 09-11-2007 10:19

Re: Get damage to armor
 
Maby you can check the old armour and match it against the new armour and return how much armour you have lost.

Oh sorry old post... lol


All times are GMT -4. The time now is 16:34.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.