ParaStrike 10 Posted December 31, 2013 You know when you search the whole "interwebs" to solve your ARMA scripting problem, and spend 5 hours trying to get one action to work? Well this is currently me. I am trying to get any AI to attack and destroy a building. My ultimate goal is to create a simple template we can use to have any unit, target and destroy static map objects. i.e. tanks destroying cities, planes bombing bridges, civilians throwing rocks at bushes. :) I have tried dofire, dotarget, dowatch, and doreveal. I have tried to at a -10000 rating to the structure. I have added "Destroy" waypoints. I have used Gamelogic to define the map object's name I can make an AT soldier blowup any vehicle with these commands. This works for friendly, enemy, empty, and Civilian. I cannot however get any vehicle to attack these same targets. Nor can I get the AT soldier to fire at the building. Thanks. Share this post Link to post Share on other sites
ringoray 1 Posted December 31, 2013 (edited) have you tried getting the id of the buildings and dotarget or dofire them, it might work, might not. I am by far a scripting master, but worth a try since your having trouble. Or would placing an enemy there with the probability of presence at zero beside said buildings work? Edited December 31, 2013 by ringoray suggesting new ideas Share this post Link to post Share on other sites
zodd 14 Posted January 1, 2014 I would suggest possibly something along the lines of this: http://forums.bistudio.com/showthread.php?88834-Invisible-target&p=1469168&viewfull=1#post1469168 However use from the wiki, for deleteCollection: http://community.bistudio.com/wiki/deleteCollection You might need to use hideObject instead of deletecollection. http://community.bistudio.com/wiki/hideObject Possible issues - If you cant get them to fire at an empty vehicle and your workaround is using the enemy vehicles, it can (I believe) still move/shoot/make noise... You might need to look at disabling simulation? Also ordinance fired at it will probably hit it before the actual target - possible workaround would be deleting it when fired upon etc to achieve the required effect.... Or you could script it so when the object (eg. you could use a civ car or something) is destroyed, it destroys the real target too... Unable to test the ideas but hopefully enough to get you on track! Good luck! Share this post Link to post Share on other sites
ParaStrike 10 Posted January 1, 2014 I would really like to make it work more fluid, with the ai targeting the actual building. I believe that changing the side of the building might work, but I cant get it too. wouldn't it be nice if you could just use a trigger that changed the buildings from good to super evil. The planes would then target those specific buildings for a shock and awe effect. - as always the easiest solution would be to have a player destroy the buildings, but that player would have a huge negative rating/points score! As buildings are considered Civilian. Share this post Link to post Share on other sites
zodd 14 Posted January 1, 2014 Not sure if you can do it - I would have thought that 'side' would be a unit variable and not present in the buildings class... If it is, this is the only way I think it could work: fn_unitSwitchSide.sqf http://forums.bistudio.com/showthread.php?133269-Make-Afrenian-Army-enemy&p=2133034&viewfull=1#post2133034 Share this post Link to post Share on other sites
Falsche9 11 Posted January 2, 2014 If you want enemy aircraft to destroy a building use a laserTarget: _nBuild = [0,0,0] nearestObject 26967;//replace with building ID _box = boundingBox _nBuild; _height = _box select 1 select 2; _lt = "LaserTargetE" createVehicle [0,0,0]; _lt attachTo [_nBuild,[0,0,_height]]; Share this post Link to post Share on other sites
ParaStrike 10 Posted January 3, 2014 Thanks falsche for the target. What about my original question, i cant get tanks or any other unit to kill the building. From what i remember i could get them to target the building, just not attack it. Share this post Link to post Share on other sites