AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   back stabbing (https://forums.alliedmods.net/showthread.php?t=56792)

Cheap_Suit 06-21-2007 01:22

back stabbing
 
I've been trying to figure if the user is knifed on the back using Traceline but no luck. Anyone have any ideas?

Deviance 06-21-2007 01:46

Re: back stabbing
 
Only way i can think of is to check the angle of the player that is knifed, but there's probably better ways.

_Master_ 06-21-2007 05:33

Re: back stabbing
 
I think it depends on what you mean by "back". Does "back" means that the victim has no visual contact with the killer ? If so then just do a viewcone check on the victim. If you use "back" as an extended area than just viewcone then I would check aim angles on both players, make vectors and see the relative position of each other (using axis slopes in this case would get a more accurate result).
Or compare the relative positions of the players.

Cheap_Suit 06-21-2007 11:58

Re: back stabbing
 
Well my real purpose is manipulate the damage done, and it seems you only need one hit to kill a person stabbing from the back.

Sylwester 06-21-2007 13:23

Re: back stabbing
 
Why don't you use damage event? You can check if attacker used knife and if he made certain amount of damage. Then you can change victims health.


All times are GMT -4. The time now is 21:29.

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