dimdic 1 Posted June 6, 2012 (edited) Hi there! I want to make an AI unit (having only RPG7 as a weapon) fire at a specific position. Are there any scripting commands to do it ? Thank you. p.s. I can't understand why i can't set the RPG7 weapon as a primary weapon !! Edited June 6, 2012 by dimdic Share this post Link to post Share on other sites
Tajin 337 Posted June 6, 2012 Try these, and pick the one suitable for your situation. http://community.bistudio.com/wiki/fire http://community.bistudio.com/wiki/doFire http://community.bistudio.com/wiki/suppressFor ps.: get used to searching on the wiki when you need specific commands Share this post Link to post Share on other sites
zodd 14 Posted June 6, 2012 Agree with above with a caveat: This is actually a very difficult thing to achieve, especially if you want to have it at a set time (ie. fire at a target immediately on a trigger firing) and not at an enemy (ie. at a position rather than 'that enemy') Unfortunately a search of the forums would lead to many dead ends.... for now at least; hopefully patches will fix some of the commands! Share this post Link to post Share on other sites
dimdic 1 Posted June 6, 2012 Try these, and pick the one suitable for your situation.http://community.bistudio.com/wiki/fire http://community.bistudio.com/wiki/doFire http://community.bistudio.com/wiki/suppressFor ps.: get used to searching on the wiki when you need specific commands Tajin, before creating a new thread in this forum, i used both the commands dofire and commandfire and the AI unit did nothing !! I also checked the command fire but with this command i can't fire at a specific unit (or position). Share this post Link to post Share on other sites
Tajin 337 Posted June 6, 2012 (edited) Tajin, before creating a new thread in this forum, i used both the commands dofire and commandfire and the AI unit did nothing !! I also checked the command fire but with this command i can't fire at a specific unit (or position). Ok cool, that wasn't apparent from your first post though. I'd try something like this, if you want it to fire at a specific position, not at a unit: person selectWeapon "RPG7V"; person lookAt markerPos "targetmarker"; person fire ["RPG7V","RPG7V"]; I'm not sure if the "fire" command is currently functional. Alternately, try this: http://community.bistudio.com/wiki/ArmA:_Actions#USEWEAPON Using invisible targets can also be helpful, when the unit doesn't want to target a specific position by itself. Edited June 6, 2012 by Tajin Share this post Link to post Share on other sites
dimdic 1 Posted June 6, 2012 Thanks a lot Tajin :) !!! I had the same thought about the looAt command one minute before you write to me :) !!! your code seems to be working !! Thank you a lot for your help !!! Share this post Link to post Share on other sites
Tajin 337 Posted June 6, 2012 You're welcome. Glad it worked. Share this post Link to post Share on other sites