Jump to content
Sign in to follow this  
slothstronaut

Custom Ammunition Types and Events

Recommended Posts

Hey guys.

 

I have an idea for a project, and I'm wondering if there's a way to create a custom ammunition type and to have an event fire when that ammunition type is fired / hits someone or something?

 

The only way I can think of doing it, is to attach an event to the object being hit for "hit" events, which:

1. Detects if the ammunition type used is my custom type 
2. Fires another event based on the ammunition type 

This seems to be a little wasteful, and I'm not even sure if it's possible. 

I would like to be able to attach a script to the ammunition itself stating what happens when it hits something, but I can't seem to find anything in CfgAmmo that would allow me to do this.

Any pointers to documentation or forum threads dealing with this that you know of would be fantastic.

 

Cheers!

Share this post


Link to post
Share on other sites

My only concern with using the "fired" or "hit" is that it could be potentially expensive. If you have a hundred active players, and each of them is firing weapons, that's a lot of event calls and checks given the event is called for all ammunition types. I can't seem to find a way to attach an event to a particular ammunition type though, so it might just have to be that way!

Share this post


Link to post
Share on other sites

No you cannot make custom ammunition. 

 

Also you don't have to use the mines that come with the game.

 

Instead you can use artillery shells or aircraft bombs that come with the game to create large explosions.

 

If you want small explosions use the smaller hand grenade. You can even use individual bullets.

.

 

 

 

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  

×