Kydoimos 916 Posted November 26, 2013 Hello all - wondering if anyone can help me with this? Basically, I have _unit DoTarget _Target; _unit DoFire _Target. Now what I want to do, is to stop the unit firing at the target I've assigned. It's a shooting range target. I've tried Dowatch ObjNull and disableai "Target" but none of these things appear to work. I would just set the ammunition to 0 but I need the unit to be able to target enemy units. :p I bet the answer's dead simple and I've missed something glaringly obvious. Share this post Link to post Share on other sites
big_wilk 12 Posted November 26, 2013 Well I was gonna sugest you use assigntarget insteed, but was just reading the wiki and someone has said: "It appears doTarget objNull can not be used to stop a unit targeting a previously assigned target. Using doWatch objNull will achieve the desired result. (ArmA v1.12Beta) " So i guess thats problem solved? Share this post Link to post Share on other sites
f2k sel 164 Posted November 26, 2013 I think you can only give them a new target but that won't take effect until the clip is empty. Share this post Link to post Share on other sites
Kydoimos 916 Posted November 26, 2013 Tried doWatch objNull, but it didn't work. And I don't really want to assign a new target, either. Thanks for the suggestions though, chaps. I do appreciate it! Share this post Link to post Share on other sites
Nikos85 10 Posted November 26, 2013 I'm using a trigger to make ai aim at player when he enters using doTarget in the onAct box and setBehavior "safe" in the onDeact box seems to be working. Share this post Link to post Share on other sites
f2k sel 164 Posted November 26, 2013 (edited) I'm using a trigger to make ai aim at player when he enters using doTarget in the onAct box and setBehavior "safe" in the onDeact box seems to be working. That's not quite the issue, the problem is after the DoFire command has been used they empty the full clip. Setting behavior has no effect and they will keep firing until it runs out of ammo. On the subject of shooting ranges how do you get them to shoot a target with a gun, mine just throw grenades at all targets. Edited November 26, 2013 by F2k Sel Share this post Link to post Share on other sites
Kydoimos 916 Posted November 26, 2013 F2K Sel, I don't know! :p I'm using the commands with a machine gun mounted Strider. I think the FireatTarget might work for what you need. Share this post Link to post Share on other sites
2nd ranger 282 Posted November 26, 2013 Well I don't know if it's convenient for what you're doing, but you could use fireAtTarget in the first place to 'fake' that it is firing at it. [] spawn { _shooter dowatch _target; sleep 1; for "_i" from 0 to 10 do { _handle = _shooter fireAtTarget [_target]; sleep 0.1; }; }; Tested that on a Strider. It makes it fire a full-auto burst at the target. Share this post Link to post Share on other sites
f2k sel 164 Posted November 26, 2013 I see I've used useweapon before but it's more trouble than it's worth, if there are several targets it ends up missing everything. FireatTarget isn't that more like what your after as it only seems to work for vehicles. It will fire one shot and stop. Beaten to it by Ranger. Share this post Link to post Share on other sites
Kydoimos 916 Posted November 27, 2013 Interesting guys, thanks for that! I'll try it out. :) Share this post Link to post Share on other sites