Jump to content
Sign in to follow this  
johnnylump

Firing for effect

Recommended Posts

I'd like to have some artillery pieces fire their guns but delete their shells as soon as they fire. This will create the visiual and sound effect of firing but won't destroy the countryside in front of the guns.

I've got the guns pointing the right way with a dowatch toward a gamelogic. I've got them firing with the fire command.

I haven't been able to consistently delete the shell the moment it is created at the gun barrel.

I've tried a number of variations (in each gun's init field) of with the fired eventhandler:

this addeventhandler ["FIRED","deletevehicle nearestobject [_this select 0, _this select 4]"]

this addeventhandler ["FIRED","deletevehicle nearestobject [this, _this select 4]"]

this addeventhandler ["FIRED","deletevehicle nearestobject [getpos this, _this select 4]"]

The first one works some of the time but not always; the others not at all. The problem may be with nearestobject not catching the shells in time. Any thoughts/alternatives?

Share this post


Link to post
Share on other sites

You could just make a script that billows smoke out of the cannon's barrel and plays the cannon's firing sound.

Share this post


Link to post
Share on other sites

johnnylump:nearestobject only works within something like 50m of the scan point.

Consider slowing down the projectile.

Let me know if this solves your problem.

If it's not an option (= you're using somebody else's artillery addon), well I will have good news for you soon.

dinger

www.thechainofcommand.com

Share this post


Link to post
Share on other sites

Thanks for replies.

Yes, they aren't my addons.

I'm breathless with anticipation.

Share this post


Link to post
Share on other sites

Figured out a workaround, using first addeventhandler.

I have the guns dowatch a point 200 meters +z above the target gamelogic. They elevate their guns, and when they fire, nearestobject seems to catch and delete the shells.

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  

×