celery 8 Posted March 4, 2010 I attached a static weapon (SPG-9) on top of a VW Golf and I want it to fire when I press a button. However, it cannot take the "fire" command without an AI gunning it, and the AI bastard always rotates the gun to god knows where. I also tried using the player for the short duration the gun fires but it's too much for the engine to do properly. How can I remotely fire the gun without having its direction altered? Share this post Link to post Share on other sites
[frl]myke 14 Posted March 4, 2010 A simple but probably "ugly" workaround: remove weapon and magazines from the SPG-9 add weapon and magazine to the VW Golf. Weapons are not hardcoded to it's visual model so you can basically add every weapon to every vehicle. This workaround i state as "ugly" because the firing position is no longer at SPG-9 position but lower, might look loke the projectile commin right out of the windscreen. But at least Driver is able to fire and other players can see the vehicle is armed. Share this post Link to post Share on other sites
celery 8 Posted March 4, 2010 (edited) A simple but probably "ugly" workaround:remove weapon and magazines from the SPG-9 add weapon and magazine to the VW Golf. Weapons are not hardcoded to it's visual model so you can basically add every weapon to every vehicle. This workaround i state as "ugly" because the firing position is no longer at SPG-9 position but lower, might look loke the projectile commin right out of the windscreen. But at least Driver is able to fire and other players can see the vehicle is armed. That would be the logical solution, but being a car with no real weapon hardpoints, firing a missile or rocket crashes the game. That's why I need the separate weapon itself to fire. Edited March 4, 2010 by Celery Share this post Link to post Share on other sites
Lucky44 13 Posted June 9, 2010 (edited) Has anyone made any progress with this? Is some combination of AttachTo and AddAction possible to add a fire-able weapon to a vehicle? -That is, a weapon that can be fired by the driver??? (This is getting toward the Mad Maxx realm, a bit far from the original Arma world, but it could be fun.) Edited June 9, 2010 by Lucky44 Share this post Link to post Share on other sites
CarlGustaffa 4 Posted June 9, 2010 What happens if you just spawn the missile/rocket in front of the weapon and give it a little jolt on velocity if it doesn't start to move automatically? Effects and sound might have to be handled as well though. Share this post Link to post Share on other sites
st_dux 26 Posted June 9, 2010 Try putting a game logic in the gunner seat. Share this post Link to post Share on other sites
Lucky44 13 Posted June 9, 2010 (edited) Try putting a game logic in the gunner seat. How would that work? Would you use "moveInGunner" for it? And then how would you set it up to be fireable by the driver? Edited June 9, 2010 by Lucky44 Share this post Link to post Share on other sites
st_dux 26 Posted June 9, 2010 How would that work? I'm not sure that it would. It's an old trick from ArmA 1 for having Searchlights that don't need to be manned. But yes, it used to work with moveInGunner. Give it a go and see what happens; if the game logic works, then I can probably come up with a remote control scheme. Share this post Link to post Share on other sites
Lucky44 13 Posted June 9, 2010 I'm not sure that it would. It's an old trick from ArmA 1 for having Searchlights that don't need to be manned. But yes, it used to work with moveInGunner. Give it a go and see what happens; if the game logic works, then I can probably come up with a remote control scheme. I can't seem to get it to work. Even the basic moving the GL into the gunner position of a static MG doesn't seem to work. In my understanding, that should create an "auto turret" that would fire on any unfriendly automatically. But it's not firing on anyone of any side. I tried setting it to SideEnemy, but that didn't seem to help. But maybe I didn't do that right. Share this post Link to post Share on other sites
st_dux 26 Posted June 9, 2010 Come to think of it, I vaguely recall reading somewhere on OFPEC that the game logic gunner trick no longer works in ArmA 2. So nix that. Perhaps you could insert a real gunner and then hide him using hideObject (would require the beta version of ArmA 2)? I can't think of a way to make the weapon fire without a gunner of some kind. Share this post Link to post Share on other sites
f2k sel 164 Posted June 9, 2010 I've tried all these ways and none of them work,you can hide the unit move him in but then he becomes visible again as he becomes part of the gun. You can't move a game logic in, won't report an error but it fails to do anything. I've tried disableAI "move" or "Target" and "AUTOTARGET" without success. unit enablesimulation false works perfectly for stopping the gun from moving but it won't fire either. The best I ever got was to place a manned gunner in position and just keep setting the direction to that of the truck using getdir ,setdir in a loop the gun still has problems of wanting to shoot into the air and it's very inaccurate as the gunner fights with the setdir. Share this post Link to post Share on other sites
Lucky44 13 Posted June 26, 2010 I've got some vehicles set up with tripod-mounted MGs on the roof, and gunners (AI or player) can get in and use them. But I still can't figure out how to make them (or any weapon) fixed and fireable by the driver. Anyone? Anyone? Buehler??? Share this post Link to post Share on other sites
CarlGustaffa 4 Posted June 26, 2010 According to this it seems we will be getting a new fireAtTarget (syntax: vehicle fireAtTarget [target, weapon]) command. Now, let's just hope (pretty pretty please with cherry on top) that "target" can also accept a 3D position instead of target (object) only. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted June 27, 2010 Sorry for OT but... unit setVelocityTransformation [position1, position2, velocity1, velocity2, vectorDirection1, vectorDirection2, vectorUp1, vectorUp2, timeDiff] Oooooh. :eek: Share this post Link to post Share on other sites
f2k sel 164 Posted June 27, 2010 According to this it seems we will be getting a new fireAtTarget (syntax: vehicle fireAtTarget [target, weapon]) command. Now, let's just hope (pretty pretty please with cherry on top) that "target" can also accept a 3D position instead of target (object) only. How soon, that would help solve so many problems. Share this post Link to post Share on other sites