Home   Help Search Login Register  

Author Topic: Fire weapon, just don't hurt anybody  (Read 458 times)

0 Members and 1 Guest are viewing this topic.

johnnylump

  • Guest
Fire weapon, just don't hurt anybody
« on: 03 Jul 2003, 22:49:03 »
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) using the fired eventhandler, some drawn from other suggestions in this forum:

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?

_hammy_

  • Guest
Re:Fire weapon, just don't hurt anybody
« Reply #1 on: 07 Jul 2003, 19:52:44 »
you can just have them fire at a gamelogic thats far away so it wont kill/hurt any1