Jump to content
draoth

Check if static object is hit by bullet

Recommended Posts

So i'm have a mission, with random objects spawning in a small area. I want those objects to react when being hit by a bullet (Delete/Disappear). I don't have any idea how to do this since i have little experience with Event handlers. So if you know an easy way to do this, and teach me how i can do it myself later on i would be very happy!

 

Draoth

Share this post


Link to post
Share on other sites

I hope this helps

// Random object "_obj"
_obj addEventHandler ["HitPart",{deleteVehicle (_this select 0 select 0)}];

 

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, Nikander said:

I hope this helps


// Random object "_obj"
_obj addEventHandler ["HitPart",{deleteVehicle (_this select 0 select 0)}];

 

Thanks! That's what i needed. Another question. if i want to change delete vehicle to something else in the future (Like playsound ). will this still work ?

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

×