Jump to content
Sign in to follow this  
Lor

Detecting if "bullet" or "explosion" caused injury

Recommended Posts

I'm creating a set of medic scripts.

When a unit takes damage, I need to know basically whether the damage was caused by a bullet, a grenade, or an explosion.

Is there any way at all to do this?

The hit event handler doesn't seem to return what caused the damage, and I can't think of any clever scripting hacks.

Really, the HUGE question is whether or not this could be adjusted to detect if units are damaged by grenades, or vehicle explosions -- as really, all I need is to tell whether the cause of damage was "bullet", or "explosion".

Unfortunately, every solution I come up with would require the ability to check the type of object AFTER it has caused the damage, which doesn't seem to be possible without tracking -every- bullet fired and grenade thrown =/

Anyone have any ideas?

Many thanks in advance!

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  

×