processBirdGunShot
Client-side
Runs a gunshot trace against every shootable managed bird, for custom weapon systems.
Syntax
bool processBirdGunShot(element attacker, int weapon, Vector3 start, Vector3 end)Arguments
attackerelementElement credited with the shot.
weaponintWeapon ID reported to the event.
startVector3Trace start.
endVector3Trace end.
Returns
true when the trace hit a shootable managed bird; false otherwise.
Ownership and lifecycle
A bird belongs to the client resource that created it and is removed when that resource stops. Birds fade near their render distance instead of being destroyed, and a dimension or interior mismatch hides them while keeping the element alive.
Important behavior
- This exposes the same hit test the built-in path uses, so a custom weapon or bullet system can participate instead of reimplementing it.
- A hit raises the cancellable onClientBirdShot event.
- The reference harness feeds onClientPlayerWeaponFire traces through this function.
Where this comes from
SOURCECLuaBirdDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaBirdDefs.cpp INTRODUCED / EXTENDED23fedfbc9Read the commit and why the change was made TEST RESOURCE bird-test test-resources/bird-test
RELATED NEON APIS
Read the system guide →