Quick Question: hitzone from get_user_attacker
Hey folks, I just wanted to confirm that hitzone #3 as returned from a call to get_user_attacker is the back, is that correct? I cannot seem to find a reference to where those zones are defined, all I see are these:
* 1 - generic * 2 - head * 4 - chest * 8 - stomach * 16 - left arm * 32 - right arm * 64 - left leg * 128 - right leg */ I can only seem to get a 3 from hitting the back so I hope thats the answer, but any info or confirmation on this would be appreciated. Thanks, Mugwump |
Re: Quick Question: hitzone from get_user_attacker
3 isn't a bit flag though ..
That would be 2 and 1. A head and generic hit. The back isn't a hitzone, sadly, you so far as I know you have to calculate that for yourself. |
Re: Quick Question: hitzone from get_user_attacker
Argh, thats not what I was hoping to hear but it makes sense...
Does anyone know of examples that determine if the back is hit? Is there even enough info? My guess would be if I could calculate the direction vector for both myself and my target I could figure that out as we'd both ned to be facing close to the same direction... Thanks, Mugwump |
Re: Quick Question: hitzone from get_user_attacker
sry but i wont give you an answer but i think you are trying to do stuf when someone got hit somewhare or something so i post this pice of code and i think you know what to do use dmg event instead.
dont think this works on back-.- like purple pixie sayd PHP Code:
|
Re: Quick Question: hitzone from get_user_attacker
If you knifed someone in the back, how does HL know its a backstab? Maybe by the way the 2 players were oriented in relation to eachother?
|
Re: Quick Question: hitzone from get_user_attacker
I think I have a reasonable guess...
1. Calculate the direction angles for myself 2. Calculate the direction angles for my target 3. We should roughly be facing the same direction (maybe within +-45 in x and y) Code:
new Float:angles[3],tangles[3]-Mugwump |
Re: Quick Question: hitzone from get_user_attacker
I have confirmed in game that this is as good an approximation as I'd want to determine the success of landing a backstab, etc ...
Thanks for the help folks. -K2/Mugwump |
Re: Quick Question: hitzone from get_user_attacker
Congrats, and this would be a good guide for those who want to find out how to look for back-attacks too
|
| All times are GMT -4. The time now is 16:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.