Cloughy 0 Posted April 9, 2007 Basically i want to manually fire a pk or DShKM at a helo, or very near it. Its for my cutscene where a helo goes down, but the commies wont always fire on it. I use the DoTarget and Fire commands to try and make it shoot at the helo. I have heard it can be done with LGB and thought it may be done with Set dir and velocity and stuff. Anyone know if it can be done? Cheers GC Share this post Link to post Share on other sites
Cloughy 0 Posted April 12, 2007 Come on, Somebody must know how to do this. It must be on the same lines as creating a bomb and setting its velocity and dir? To anyone who can help. Cheers GC Share this post Link to post Share on other sites
mcnorth 0 Posted April 13, 2007 Go to this thread at OFPEC. http://www.ofpec.com/index.p....29146.0 There's a sample mission I posted that simulates a helicopter shootdown which may suit your needs. It doesn't rely on any ai units shooting, but instead uses a simple little script that plays a boom boom noise then the chopper goes down in flames. For a cut scene it should be fine. Share this post Link to post Share on other sites
Cloughy 0 Posted April 14, 2007 I have decided to use the unit fire "WeaponName" Seems to work when i did a simple test. Also used unit dowatch. Just hope it works in the mission. Though its a DKSHM (or whatever) so i will have to give command in a loop to simulate automatic fire. Cheers for the help though. GC Share this post Link to post Share on other sites
ArmaVidz 0 Posted April 15, 2007 I understand this takes time but, if you would so kindly post your code I for one, would be greatly appreciated. Share this post Link to post Share on other sites
Cloughy 0 Posted April 15, 2007 _unit = _this select 0 _target = _this select 1 _unit doWatch _target ~2 _i = 0 #loop ?i<10 : _unit fire "WEAPON-NAME" ~0.3 _i = _i + 1 goto "loop" *************************************** Weapon names here http://community.bistudio.com/wiki/ArmA:_Weapons Its not perfect, but could be with some tweaking. Cheers GC Share this post Link to post Share on other sites
Cloughy 0 Posted April 15, 2007 Heres a better one, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 _target = _this select 1 _max = _this select 2 _weapon = _this select 3 _delay = _this select 4 _unit doWatch _target ~2 _i = 0 #loop _unit fire _weapon ~_delay _i = _i + 1 ? _i < _max : goto "loop" exit Worked with a shilka i just tested, fireing at a harrier. You may want to use doTarget if you want it to be accurate. Good effect though. P.S _max is the loop max, and delay is the delay between commands. Ie longer delay for a shilka than a pk or DSHKM. Cheers GC Share this post Link to post Share on other sites