Jump to content
Sign in to follow this  
rejenorst

Planes targeting lasers Patch v1.60

Recommended Posts

Hi I had an airstrike script that placed a laser attached to an ammo box on top of a building and then spawned an aircraft which would target the laser and drop a bomb on it (The AI does this automatically). When I run the script in the editor with a few units around the script works flawlessly. Likewise the script also worked in my missions pretty consistently. However when I play the script in my missions the aircraft no longer targets the laser.

Has anyone noticed any changes in AI aircraft behavior in regards to laser targeting with the 1.60 update?

Thanks.

Share this post


Link to post
Share on other sites

Seems to be working fine here for both spawned and placed aircraft when run as mission or in the editor.

In the patch they did change the visibility of the laser target by allowing it to be hidden but still seen and targeted by the AI.

Other things that have changed are how objects are seen by the AI, they are constantly tweaking things so that only objects that can be seen without obstruction are revealed.

Share this post


Link to post
Share on other sites

Hmm its strange, since the script works fine if I run it with a few units around to test but in my mission the plane hasn't worked yet at all. It just flies around the waypoint on the laser marker and doesn't drop its payload :(

Share this post


Link to post
Share on other sites

Does the script use the reveal command to help the pilot have the best chance of finding the laser target?

The new alternative syntax allows you to set the knowledge value.

Share this post


Link to post
Share on other sites

Yeah I use the reveal command to help the pilot find the laser.

Share this post


Link to post
Share on other sites

If it's a spawned aircraft it will need a unit of the same side on the map or it will never fire.

Share this post


Link to post
Share on other sites

Hi Fk2 Sel. There are friendly units on the map and the player is on the same side as the spawned plane as well.

Share this post


Link to post
Share on other sites

I can't replicate the problem but if you want to post your code I can take a look.

Share this post


Link to post
Share on other sites

I just wanted to mention that I think I have found a workaround today (still needs further testing but I finally had some success.)

For some reason inside my mission the airstrike script wouldn't work but outside of my mission when testing on a blank map with only a few units the script would work fine.

Turns out that the plane was aiming at the laser target but not dropping the bombs. I don't know why but basically I ran a loop using aimedattarget command which returns how well the plane is aimed at the target. so when > 0 I have the script manually fire "Bomblauncher". So far looks promising I just need to test it out a bit more.

Share this post


Link to post
Share on other sites

Ok so I've got it working. Its rough and the accuracy is so so but the bombs get pretty close to the target (either on target or within 25-50 meters).

I have it check for > 0.5 and then have the script sleep for a random 0.5 seconds and then use _plane fireAtTarget [_laser,"bomblauncher"]

0.6 is better (was spot on during testing on building targets) but sometimes the plane doesn't get that far in targeting (I've had to move the laser marker a bit so will test it again as it was to close to the building roof previously which may have caused some LOS problems.)

Anyway hope his helps anyone wanting to make a rough Airstrike script using laser markers and spawned planes.

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  

×