Jump to content

Sign in to follow this  
thedarkbird

Lasertarget bombing script (working) - Improvement needed

Recommended Posts

The goal is to destroy all buildings of a base by lasing every building nearby. It works, however, the weak point is the laserpointer height: if it's located in a building (instead of on top), the bomber aircraft can't see it and it doesn't work.

So basically it would be necessary to place the laser exactly on top of buildings...

hideObject baselocation; //Hide base object
hideObject marker;	//Hide marker object
while {(getPos baselocation) distance (getPos marker) < 100} do //Only take out buildings near the baselocation object
{
_building = nearestBuilding baselocation; //Select the nearest building
marker setPos (getPos _building); //Move the marker object to that building
_lase = "LaserTargetW" createVehicle [getpos marker select 0, getPos marker select 1, 0]; //Make a laser
_lase attachTo [marker, [0,0,3]]; //Attach the laser to the marker object, but 3 units higher ([b]WEAK POINT[/b])
 waitUntil {!alive _building}; //Let air vehicles bomb it to pieces
 deleteVehicle _lase; //When destroyed delete the laser 
 //Rinse and repeat
};
hint "Done lasing";

Suggestions for improvement?

Edited by thedarkbird

Share this post


Link to post
Share on other sites

You can try this, (got the idea from another thread about soldiers on roof tops):

  Quote
laserm setpos _laserpos;

laserm setPosATL [getPos laserm select 0,getPos laserm select 1,30];

laserm setPosATL [getPos laserm select 0,getPos laserm select 1,(getPosATL laserm select 2)-(getPos laserm select 2)];

This will more or less place the object to which you've attached the marker directly on the first point of contact down from 30 meters. (I assume most buildings in A2 are under 30 meters but there are some exceptions like mosques in OA etc. So adjust as you see fit.

Share this post


Link to post
Share on other sites

The laser must be visible or it won't work, I'll have to check the above post as it looks easier than what I did a while back.

I'll pot the script in a spoiler as no to take up space.

Problems I had in the past was with multiple planes, they would all fire at the same target and wast bombs.

I also tried to add some fire that would burn for a while after the hit.

For the height of the building I just found the actual hight and place the laser a fraction above it, too high and it will hit something else.

Also _plane dotarget lase improves it's chance of a first time strike.

The script was never really polished though.

/

  Reveal hidden contents
Edited by F2k Sel

Share this post


Link to post
Share on other sites

Hi F2k Sel. Yeah I know what you mean about the laser. The command I gave you will stop the laser from going inside the building and will have it rest on the rooftop. This isn't a perfect setup but its the best I can do at the moment. Its better suited for hellfire rockets but I haven't tested it with jet bombs yet.

Here's a video of mine using the command for hellfire laser target designation (note that the laser doesn't spawn on the building centers which leaves me free to manually place the lasers whereas you will probably want to setpos it onto the building center):

Share this post


Link to post
Share on other sites

That looks really good if I get chance I'll try and swap bounding box for setposASL.

Share this post


Link to post
Share on other sites

I ran some brief tests with the AI and they seem to be hitting the buildings with their bomblaunchers. However I think they do it only once. Which is fine, I think you end up having to respawn the marker in order to get them to target a new building/location.

What are your findings?

Also if your interested, this is my hellfire mission using the laser targeting system (ASL): http://www.armaholic.com/page.php?id=14584

Edited by Rejenorst

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  

×