Hello,
I am trying to capture when fire damage is destroying building blocks. I tried using OnEntityTakeDamage, and it seem to capture when damage is done directly such as incendiary bullet and other incendiary weapon damage. but damage performed after initial contact is not being captured. Does anyone know a way to capture secondary damage such as fire damage? Thanks,
d
Issue detecting fire damage
Discussion in 'Rust Development' started by President Deathcat, Apr 15, 2016.
-
if (hitInfo.Initiator is FireBall) { }
? -
Thanks for the reply. I will definitely play around with this, but it seems OnEntityTakeDamage is not even recognizing secondary damage that occurs after the initial hit. For example, I shoot an incendiary bullet into a wall. OnEntityTakeDamage captures the damage taken by the bullet, but all flame damage taken afterwards on the entity and other surrounding entities are not captured by OnEntityTakeDamage . It only accounts for initial damage. Same with the flame thrower. I use it on a wall and OnEntityTakeDamage captures the first damage caused, but not any damage caused by the fire. The weird thing is that I shoot a incendiary rocket into the air and it explodes, raining fire onto the structure below. OnEntityTakeDamage will work properly and capture the fire damage as intended, and contunue capturing until the fire is out or the entity is destroyed. Weird.
-
Help! I cant figure this out --- when I fire some incendiary rounds on a foundation, and the resulting fireball is burning the foundation -- how do I get the original entity owner who technically spawned the fireballs on the foundation?
I've tried many things, including the following -- which are always null or 0 :
Code:void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { if (info?.Initiator is FireBall) { Puts("Fire Damage from {0}", info?.Initiator?.OwnerID); Puts("Fire Damage from {0}", info?.Weapon?.parentEntity.Get(true).OwnerID); Puts("Fire Damage from {0}", info.InitiatorPlayer?.displayName); }
-
Anyone?!
-
-
I think I did this before...maybe?
My memory sucks but I think the same issue existed determining if someone was killed by heli napalm/fire.
I feel like I was able to get the parent/owner of the fire, maybe?
Might be bullshit...Last edited by a moderator: Mar 1, 2018 -
Turns out that is BS. Sorry.
-
I wasn't able to get the ownerid or the parent, either.
-
Don't waste your time, in current state it's not possible.