Setting the same TraceLine twice
Can I do this:
PHP Code:
|
Re: Setting the same TraceLine twice
What are you trying to accomplish?
|
Re: Setting the same TraceLine twice
Well, I want that when a player attacks an enemy and hit him, it will also damage the nearest player to the enemy (if the nearest player is an enemy as well). So I wanted to make sure it will hit the original target for 100%, along with the nearest enemy to the victim.
Or maybe I can simply get the damage of the attack from Ham_TakeDamage and use: set_user_health(ent, get_user_health(ent) - damage)? |
Re: Setting the same TraceLine twice
Quote:
|
Re: Setting the same TraceLine twice
Or use ExecuteHam(Ham_TakeDamage,...) to avoid health bug.
|
Re: Setting the same TraceLine twice
Quote:
EDIT: Can I use ExecuteHam(Ham_TakeDamage,...) on more than one entity? For example using it twice to decrease health for 2 entities? And where and how am I suppose to use it? I don't know much about the HamSandwich module...:oops: |
Re: Setting the same TraceLine twice
Code:
Ham_TakeDamage |
Re: Setting the same TraceLine twice
this = victim?
and who is the idinflictor? what is the difference between inflictor and attacker? and can I use this message/event in any function I want? Sorry for all the questions, I'm still learning... Gladly from you and Exolent. :D |
Re: Setting the same TraceLine twice
Quote:
|
Re: Setting the same TraceLine twice
this = entity being damaged
idinflictor = entity causing damage attacker = entity causing idinflictor to cause damage ------------------ Example: Player2 shoots Player1: this = Player1 idinflictor = Player2 attacker = Player2 Note: With guns, the inflictor and attacker are the same. But with grenades, the inflictor is the grenade entity index. ------------------ Example: Player1 falls from a high spot and gets hurt this = Player1 idinflictor = Player1 (or 0, cant remember) attacker = Player1 (or 0, cant remember) Note: To check if player fell, use the 5th parameter "damagebits": Code:
EDIT: Quote:
|
| All times are GMT -4. The time now is 03:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.