Jump to content
Sign in to follow this  
Kolbeck10

[OA] Placing IR Strobes on map via Editor

Recommended Posts

How would one go about placing IR Strobes onto the map via the editor? Is it possible?

Share this post


Link to post
Share on other sites

Yes of course it is possible:

Place an empty H (or a gamelogic) at the position where you want to have the IR Strobe. In that objects initialization line type:

irstrobe1="IR_Strobe_Marker" createVehicle getPos ir1

where ir1 is the name of above object.

Share this post


Link to post
Share on other sites

Edit: Damn Wolle and his nonfat fingers.

Share this post


Link to post
Share on other sites

This places the strobe, but it doesn't look like AI aircraft will target it. Anything special that can be done to make it target-able?

Share this post


Link to post
Share on other sites

Script the AI aircraft to attack the object that the strobe is attached to? It's not attacking the strobe per se but it would look pretty cool if done properly.

Share this post


Link to post
Share on other sites

I thought the point of attaching an IR strobe was to get a plane to bomb something that it normally wouldn't be able to target.

Share this post


Link to post
Share on other sites

Yeah just been playing about with it and noticed, it seems that aircraft will only target the strobe after it has been thrown.

As far as i can tell the only way is to do it is either through the strobe or script the aircraft to attack it.

Then again, what would i know, maybe there is a way?

Share this post


Link to post
Share on other sites
This places the strobe, but it doesn't look like AI aircraft will target it. Anything special that can be done to make it target-able?

do this

Yes of course it is possible:

Place an empty H (or a gamelogic) at the position where you want to have the IR Strobe. In that objects initialization line type:

irstrobe1="IR_Strobe_Marker" createVehicle getPos ir1

where ir1 is the name of above object.

but change IR_strobe_marker in a LGB and put that code in the init field of a trigger, group that trigger to the aircraft, place the H called "ir1" on the target.

when the plane hits the trigger a LGB will be spawned and detonated on the H.

you wont see a bomb falling but when you are far away you would'nt see one when one would have been falling.

make sure the aircraft has a waypoint set on careless.

you could sync a trigger to the first waypoint of a holding position and activate it by radio A, next waypoint beyond the target and the lgb trigger inbetween.

when you do this the aircraft will wait untill you call it in, passes the target, hits the trigger and so on..

play a little with multiple targets and triggers and distances to make ik realistic or just fun. (made a nice carpet bombardment once :))

Share this post


Link to post
Share on other sites

If you're not close enough to see the effect, why even have the effect? :)

Personally I've done the "trigger makes the plane drop bombs" and just try to place the trigger so that the bombs will hit near the target. Something majestic about those LGBs falling slowly out of the sky...

Share this post


Link to post
Share on other sites

I've been playing about with the LGB's and have it working quite well now.

just pop a gamelogic over the area you want hit and name it "location" Name an Aircraft "Air1" then in it's waypoint put this nul=[air1,location,100,60] execVM "lasertargets.sqf";

//////////////////////////////////////////////////////////////////
// plane = name of aircraft
// location = name of gamelogic
// 100 = targets area  radius
// 60 = how long target remains selected 
// nul=[plane,location,100,60] execVM "lasertargets.sqf";
// For OPFOR Aircraft you will need to replace free fall bombs with laser guided bombs
// this addWeapon "BombLauncher"; this addMagazine "6Rnd_GBU12_AV8B";
//

_plane      = _this select 0;
_targetarea = _this select 1;
_radius     = _this select 2;
_times      = _this select 3;



_loops = 0;

{ 
_targetarray = nearestobjects [_targetarea,["house"],_radius];
_many =  count _targetarray;

while { (alive _x) and (_x ammo "BombLauncher" != 0 ) or (_x ammo "BombLauncherA10" !=0 ) or (_x ammo "BombLauncherF35" !=0 )  } do
{   
_loops=_loops + 1;
_clock = time;

//hint format["%1",_many];
_choose = floor (random _many);
_targ1 = _targetarray select _choose; 
_bbox = boundingBox _targ1;
_bboxh = _Bbox select 1;
_bboxheight = (_bboxh select 2)+1;

_place = "paleta1" createVehicle [getpos _targ1 select 0,getpos _targ1 select 1,0];
_place setpos [getpos _targ1 select 0,getpos _targ1 select 1,_bboxheight];
_place hideobject true;

_laze = "LaserTargetWstatic" createVehicle  [getpos _targ1 select 0,getpos _targ1 select 1,0];
_laze attachTo [_place,[0,0,0.1]];
_x dotarget _laze;// improves first time bombing

waitUntil {(!alive _targ1) or (!alive _x) or (time >= _clock+_times) };
deleteVehicle _laze;
deleteVehicle _place;
};
} foreach units group _plane;

It works quite well, Aircraft in a group will get their own target although sometimes they go for the same one. They will also now bomb on the first run.

Other aircraft not in the group will also attack the Laser Targets with a little less effect, they tend to do a fly past first.

The trick was spawning the laser where it could be seen by the aircraft and not lost in the buildings. If you want to see the selected target change "LaserTargetWstatic" to "LaserTargetW"

I'm not sure what to do with the aircraft after they are out of bombs.

It would also benefit from spawning the odd fire on the object destroyed but that's easy enough, I just wanted to keep it simple.

Maybe check for the group and when all out of ammo issue a land command.

East aircraft will need the weapons swapping but they work just as well.

You could just pop a target on all buildings in the area and just let the planes sort it out for themselves, I haven't tried that yet but it would be easy to do.

Edited by F2k Sel

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  

×