Jump to content
Sign in to follow this  
chronicsilence

Detecting incoming fire

Recommended Posts

I'm looking for a way to detect bullets that pass near by a player. I know you can use the "firedNear" event handler and then track the path of the projectile to see where it lands, but it says it's limited to weapon firings that happen within ~70m (it's also rather performance intensive to track every bullet within a large radius). I know there are some suppression mods that do this, but after opening up the source code (for LAxemann's Suppress mod) it's not obvious how it's detecting those incoming bullets. Does anyone have any suggestions for a decent way to do this?

Share this post


Link to post
Share on other sites
nearestObject [player, "BulletBase"]

That will detect close by projectiles. Returns null if there is none. Keep in mind that bullets are travelling quite fast thus it might not trigger every time.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×