So I try to figure out to get the hitInfo of a spear, a hatchet or pickaxe etc. which was thrown from a player.
OnPlayerAttack just give me the feedback of melee weapons or arrows.
OnWeaponThrown just give me response when I throw C4 etc.
OnWeaponFired only for guns...
Is there a way to get this response into a hitinfo expression?
Getting hitInfo of throwable weapons / tools?
Discussion in 'Rust Development' started by Splak, Jan 20, 2016.
-
Use OnEntityTakeDamage if you want to detect damage. OnWeaponThrown does not tell when somebody was hit but when somebody threw a nade or c4. OnEntityTakeDamage is always called for each weapon, including throwables.
-
Works for entities...
Now I just need a idea to get the entity owner of OnPlayerSpawned from throwing stuff around the map.
When you throw a spear and hits the ground, it get deleted and spawned as new entity in the ground as pickable.
Hitting right click -> Animation -> Throw -> Projectile -> Hit the ground -> Entity without owner?!
OnEntitySpawned don't have any info for this, so I need to check out, who throw the spear that hit the ground at x y z, than gets removed and spawned at this position new as entity.
