Jump to content
Sign in to follow this  
Otter

AI targetable/destroyable objects?

Recommended Posts

There are apparently some objects you can place (so far I've just played around with the small fuel tank) with the editor that a player controlled AI (only the AT man so far in the fuel tanks case) can be made to target and fire on and destroy.

My questions are, is that something that can be applied to any specific object? (making it first a target and then one that has a damage threshold?

And, can you adjust which AI classes can fire at which type of target?

I don't have a specific example in mind but it would be for something like a cutscene where rifleman and MG's in a squad fire on a parked civilian car.

Also, I'm really new to this but I assume you have to make any changes in the specific config file and class?

Share this post


Link to post
Share on other sites

Objects are side empty=civillian by default. You can make soldiers attack any kind of objects by using setFriend command. This way you can make objects hostile to any side. While this method poses the risk that all custom placed objects will be attacked by your units. You could end up with a squad of madmen who literally blast their way through empty objects as if there was no tomorrow.

A more "detailed" way to achieve that units attack a specific object could be to group an enemy unit to the object and set the probability of presence for the enemy unit to 0, so that the unit isn´t placed on the map when the mission starts. (untested though, don´t know if it works with objects)

You could also use addRating, add a negative rating as this would probably will make the object appear to be hostile to your units and they will attack it. (also untested)

Quote[/b] ]And, can you adjust which AI classes can fire at which type of target?

Not by simple scripting, this would be a moddeling job with changing the config.

Share this post


Link to post
Share on other sites

Thanks very much,

lots of new ways to play around with things now!

Share this post


Link to post
Share on other sites

If all fails, you could also open your mission.sqm after saving with the object in question and change it´s side manually there.

Share this post


Link to post
Share on other sites
If all fails, you could also open your mission.sqm after saving with the object in question and change it´s side manually there.

I did do that when I first set up the test mission using the object "pop-up target E", it did allow you as group leader to see the object with the red target reticule but it still did not show up under the "target" menu and AI would not fire on it. I did find several other objects like barrels an AT AI will fire on.

As to the other suggestions I wasn't able to apply them to objects, probably because I'm missing something, or it just may be those settable properties only apply to Man classes deeper in the cfgs?

Share this post


Link to post
Share on other sites

Does this work for houses?

Because I want a mission where enemy wants to damage houses when advancing with tanks...

Share this post


Link to post
Share on other sites

It may be possible to put targetable objects inside houses to get ai to fire at them. Would only look right if you place it in an "unopen" house or area of one.

Will try and test to see if they can see it thru the house...but since the ai seems to have x-ray vision thru most objects I don't see why not.

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  

×