Damage through players
How do I make damage go through players?
For example, a grenade explodes. I use trace_line to see if any walls in between the players within the specified damage radius. Let's say I do a traceline for player 1 and it does damage because nothing is blocking it. Next I do a traceline for player 2 and it does not do damage because player 1 is blocking player 2. Example : TOP-VIEW o - player x - grenade explosion Code:
Player #2 o - this player is not damaged since #1 is blocking view |
radius_damage function.
|
radius_damage does damage through walls. He doesn't want damage to be done through walls, which is why he is using traceline. However, he wants traceline to ignore other players so that player 1 can get hurt even if he is behind player 2, and the grenade is in front of player 2.
|
Then trace_line, get the player it hit, then shoot trace_line again with the player hit's ID in the "ignore" arguement of trace_line.
|
What exactly does the "IgnoreEnt" paramter do? I thought it ignored any ent like you set it to 1 to ignore 0 not to, but I guess not. So it ignores the ent specified in the "IgnoreEnt" paramter? So what if there is a 0 for the paramater? If it only ignores the ent specified, how do you make it ignore all the players? :?:
So would this trace through players? Code:
|
the ignore entity param can be used to ignore a specific entity.
|
| All times are GMT -4. The time now is 10:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.