Jump to content
Sign in to follow this  
tryteyker

AI and laserdesignators

Recommended Posts

Hey,

so yeah, tricky stuff going on again. Can't get the AI to target stuff with their laser designator. First off, here's the script:

_spotter = _this select 0;
_vehicle = _this select 1;
_player = _this select 2;

removeAllWeapons _spotter;
_spotter addMagazine "laserbatteries";
_spotter addWeapon "laserdesignator";

waitUntil {_spotter knowsAbout _vehicle > 0};
_player groupChat "Spotter marking target.";
sleep 0.1;
_spotter doTarget _vehicle;
_spotter doFire _vehicle;

Pretty self explanatory really. doTarget was only added because doFire alone didn't work (but it originally incorporates doTarget anyway..).

I've been doing checks and the spotter has a knowsAbout value of atleast 1 (just to be sure I added reveal to make the knowsAbout value 1, but didn't help), and has the weapon equipped. I don't get a laser target for my fancy bombs though.

A workaround here would be to place a SOFLAM but I don't even know if that exists in ArmA2 :L

Any further ideas here?

Share this post


Link to post
Share on other sites

I may be missing what you are after.

I did this recently by putting this bit in the spotter's init line in the editor:

removeAllWeapons _spotter;

_spotter addMagazine "laserbatteries";

_spotter addWeapon "laserdesignator";

Worked everytime but I didn't include the rest of your code in a script file in my mission folder.

I had three tanks as targets, when one was destroyed the spotter would switch to a live target.

Share this post


Link to post
Share on other sites

Doesn't happen for me. Even when giving him time he does not mark targets but he clearly sees them as the knowsAbout value tells me.

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  

×