Jump to content
Sign in to follow this  
ParaStrike

AI Attack/Destroy Neutral or Civillian Targets

Recommended Posts

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

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 by ringoray
suggesting new ideas

Share this post


Link to post
Share on other sites

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×