Jump to content

AFAC lasing a static object (building)


Grifter

Recommended Posts

Hi,

 

I've been searching on these forums and others for a solution to this dilemma, and it seems like there isn't one but I'm very new to using the Mission Editor. So I want a predator to serve as an AFAC and lase a building. My F-18 will then drop LGB's on said building, neutralizing the threat to freedom. Simple, right? Not so fast. Apparently, the AFAC will not lase a static object, which is the building in this case.

 

I found a lot of old threads on these forums that suggested you put soldiers and a AAA in a group and set them on the roof. Have the AFAC lase the group, and then set a trigger in the ME to have the building blow up when the AAA suffers a certain amount of damage. Unfortunately, my AFAC refuses to see the AAA on the roof despite being only 5,000 feet above and essentially circling the target.

 

Another poster suggested in an old thread that you have the AFAC lase coordinates and put the building on top of those coordinates, if I understood his post correctly. Doesn't make sense to me because the building would be blocking that point on the ground and the AFAC wouldn't be able to see it? He or she didn't provide more information in that particular thread and I haven't seen info on this notion elsewhere as of yet. So, I have no idea how to do this or if it is even possible.

 

Any suggestions as to how to solve this frustrating problem, I'd love to hear them. It is rather irksome given that you would think you'd be able to lase something as large as a building. Thanks.

 

Grifter-RLG

Link to comment
Share on other sites

Is it possible to lase specific coordinates? HOW?

 

What I did was to put an infantry very close to the building and then used CTLD to lase that unit. Not nice but a fast solucion.

I was using a ground unit to lase though. Try with the predator at 10000 agl and exelent skill, force it to lase that specific unit. It should work.

 

 

 

 

The mission editor is so prehistoric.


Edited by Ignition
Link to comment
Share on other sites

Scenery isn't targettable by AI, only coordinates on the ground (vec2) or another unit (not static)(vec3). Statics can be targeted with the advanced actions, but not sure about 'designated' though. The infantry trick has been going on for quite a few years, at least 2015 was when I first came across it (attacking a bridge).

 

 

I would stick with this approach and if you have problems with it, address why it's not finding said target.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Thanks for replying guys. Okay I'll stick with the infantry trick. I was placing them on top of the building and they were sinking inside of it. I will try placing them around the building to see if that helps. Hey, is this the script you fellas are referring to?: https://forums.eagle.ru/showthread.php?t=141297

 

 

I may have to switch to a ground unit so that it doesn't lose sight of target in this case.

Link to comment
Share on other sites

Scenery isn't targettable by AI, only coordinates on the ground (vec2) or another unit (not static)(vec3). Statics can be targeted with the advanced actions, but not sure about 'designated' though. The infantry trick has been going on for quite a few years, at least 2015 was when I first came across it (attacking a bridge).

 

 

I would stick with this approach and if you have problems with it, address why it's not finding said target.

 

I made a script to target map objects.

I'll see if I can dig it out tommorow...

Link to comment
Share on other sites

Another option would be park the truck in plain view have the JTAC laze it and then instruct the player to bomb the correct building. (Called a "Talk on" in the real world.)

 

You can put a single landmine on the roof of the target and set a trigger to activate when the landmine is destroyed.

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

I've managed to make a predator drone "buddy lase" a static building (garage) for a Su-25T client, using MOOSE.

 

The script includes a simple F10 menu to call for laser designation and to check designation status... the lasing time is randomized, btw.

 

I don't see why it shouldn't work with other aircraft, provided the correct laser frequency code is used.

 

Test mission + script file attached.

 

If you find problems with it (or need further explanation), let me know :thumbup:

 

Here's the raw script, btw:

 

local ClientGroup = GROUP:FindByName("Client")

local LasingPredator = UNIT:FindByName("Predator")

local GarageStatic = STATIC:FindByName("Garage")

local LaserFreqSu25T = 1113 -- This laser frequency code works for the following missiles: Kh29L, S-25L, Kh-25ML. Weapon launch override must be used for them to fire, though!

-- (I believe that 1688 works for GBUs in the A-10C, not sure about the Hornet, though)

 

local function LaseGarageRandom()

 

if LasingPredator ~= nil and GarageStatic:IsAlive() then

 

local TimeTable = {120, 180, 240, 300, 360}

local RandomTime = TimeTable[math.random(1,5)]

local RandomTimeMinutes = RandomTime / 60

 

LasingPredator:LaseUnit(GarageStatic, LaserFreqSu25T, RandomTime)

 

MESSAGE:New("Predator is lasing!\nPredator laser frequency = "..LaserFreqSu25T.."\nLasing will be active for "..RandomTimeMinutes.." minutes!",10):ToGroup(ClientGroup)

 

else

 

MESSAGE:New("Garage has already been destroyed\nWon't lase the rubble! ^^",10):ToGroup(ClientGroup)

 

end

end

 

local function LaseGarageCheck()

 

if LasingPredator ~= nil then

 

if LasingPredator:IsLasing() then

 

MESSAGE:New("Predator is lasing Garage!\nPredator laser frequency = "..LaserFreqSu25T,10):ToGroup(ClientGroup)

 

else

 

MESSAGE:New("Predator isn't lasing anything right now!",10):ToGroup(ClientGroup)

 

end

end

end

 

GarageStatic:HandleEvent(EVENTS.Dead)

 

function GarageStatic:OnEventDead(EventData)

 

if EventData.initiator == GarageStatic:GetDCSObject() then

 

MESSAGE:New("Garage has been destroyed!",10):ToGroup(ClientGroup)

 

end

end

 

PredatorMenuRoot = MENU_GROUP:New(ClientGroup,"AFAC Predator Menu")

LaseGarageRandomCommand = MENU_GROUP_COMMAND:New(ClientGroup, "Lase Garage (Random)", PredatorMenuRoot, LaseGarageRandom)

LaseGarageCheckCommand = MENU_GROUP_COMMAND:New(ClientGroup, "Lasing Status?", PredatorMenuRoot, LaseGarageCheck)

Building Lasing test.miz

Building Lasing test.lua


Edited by Hardcard
Link to comment
Share on other sites

@Habu_69

 

Apparently, the AFAC will not lase a static object, which is the building in this case.

[...]

Another poster suggested in an old thread that you have the AFAC lase coordinates and put the building on top of those coordinates,

 

Well, I took it from there. ;)

 

Does it matter, though? If it were me, I wouldn't mind using a static building from the structures list instead of a map building... it's still better than the infantry unit workaround, imho. :D


Edited by Hardcard
Link to comment
Share on other sites

I've managed to make a predator drone "buddy lase" a static building (garage) for a Su-25T client, using MOOSE.

 

The script includes a simple F10 menu to call for laser designation and to check designation status... the lasing time is randomized, btw.

 

I don't see why it shouldn't work with other aircraft, provided the correct laser frequency code is used.

 

Test mission + script file attached.

 

If you find problems with it (or need further explanation), let me know :thumbup:

 

Here's the raw script, btw:

 

local ClientGroup = GROUP:FindByName("Client")

local LasingPredator = UNIT:FindByName("Predator")

local GarageStatic = STATIC:FindByName("Garage")

local LaserFreqSu25T = 1113 -- This laser frequency code works for the following missiles: Kh29L, S-25L, Kh-25ML. Weapon launch override must be used for them to fire, though!

-- (I believe that 1688 works for GBUs in the A-10C, not sure about the Hornet, though)

 

local function LaseGarageRandom()

 

if LasingPredator ~= nil and GarageStatic:IsAlive() then

 

local TimeTable = {120, 180, 240, 300, 360}

local RandomTime = TimeTable[math.random(1,5)]

local RandomTimeMinutes = RandomTime / 60

 

LasingPredator:LaseUnit(GarageStatic, LaserFreqSu25T, RandomTime)

 

MESSAGE:New("Predator is lasing!\nPredator laser frequency = "..LaserFreqSu25T.."\nLasing will be active for "..RandomTimeMinutes.." minutes!",10):ToGroup(ClientGroup)

 

else

 

MESSAGE:New("Garage has already been destroyed\nWon't lase the rubble! ^^",10):ToGroup(ClientGroup)

 

end

end

 

local function LaseGarageCheck()

 

if LasingPredator ~= nil then

 

if LasingPredator:IsLasing() then

 

MESSAGE:New("Predator is lasing Garage!\nPredator laser frequency = "..LaserFreqSu25T,10):ToGroup(ClientGroup)

 

else

 

MESSAGE:New("Predator isn't lasing anything right now!",10):ToGroup(ClientGroup)

 

end

end

end

 

GarageStatic:HandleEvent(EVENTS.Dead)

 

function GarageStatic:OnEventDead(EventData)

 

if EventData.initiator == GarageStatic:GetDCSObject() then

 

MESSAGE:New("Garage has been destroyed!",10):ToGroup(ClientGroup)

 

end

end

 

PredatorMenuRoot = MENU_GROUP:New(ClientGroup,"AFAC Predator Menu")

LaseGarageRandomCommand = MENU_GROUP_COMMAND:New(ClientGroup, "Lase Garage (Random)", PredatorMenuRoot, LaseGarageRandom)

LaseGarageCheckCommand = MENU_GROUP_COMMAND:New(ClientGroup, "Lasing Status?", PredatorMenuRoot, LaseGarageCheck)

 

Excellent....thanks very much.

Link to comment
Share on other sites

@Habu_69

 

Afaik, ME JTACs can't designate statics, they only designate groups.

 

As for CTLD, I've never used it, but according to the documentation, it can't be used to lase buildings (I assumed it meant any building, statics included).

 

That's why I wrote the MOOSE script :thumbup:

 

I edited a bit your lua but I need to add a "MESSAGE:New" with the static coordinates for the Hornet with the two decimal. I did it with Ctld but I'm not an expert on Moose. THX

PC: i7-13700K - MSI RTX 4080 Gaming X Trio - 32GB DDR5 6200 - VPC MongoosT-50CM3 - VKB GF pro - MFG Crosswind - Msi MPG321UR-QD + Acer XB271HU - TrackIR5 - Rift S

Link to comment
Share on other sites

@Majinbot

 

If you want to get the LL DDM coordinates of the static building, add the following lines to the script:

 

 

local GarageCoordinatesLLDDM = GarageStatic:GetCoordinate():ToStringLLDDM() -- This will get the LL DDM coordinates for you. Add this line towards the beginning of the script, after the laser code variable, for example

 

-- Then you can either create a new message containing only the variable, like this:

MESSAGE:New(GarageCoordinatesLLDDM, 20):ToGroup(ClientGroup)

 

-- Or concatenate the variable in already existing messages, like this:

MESSAGE:New("Predator is lasing!\nPredator laser frequency = "..LaserFreqSu25T.."\nLasing will be active for "..RandomTimeMinutes.." minutes!\nTarget Coordinates = "..GarageCoordinatesLLDDM,20):ToGroup(ClientGroup)

 

MESSAGE:New("Predator is lasing Garage!\nPredator laser frequency = "..LaserFreqSu25T.."\nTarget Coordinates = "..GarageCoordinatesLLDDM,20):ToGroup(ClientGroup)

 

 

 

If you want to get the LL DMS coordinates of the static building, add the following lines to the script:

 

 

local GarageCoordinatesLLDMS = GarageStatic:GetCoordinate():ToStringLLDMS() -- This will get the LL DMS coordinates for you. Add this line towards the beginning of the script, after the laser code variable, for example

 

-- Then you can either create a new message containing only the variable, like this:

MESSAGE:New(GarageCoordinatesLLDMS, 20):ToGroup(ClientGroup)

 

-- Or concatenate the variable in already existing messages, like this:

MESSAGE:New("Predator is lasing!\nPredator laser frequency = "..LaserFreqSu25T.."\nLasing will be active for "..RandomTimeMinutes.." minutes!\nTarget Coordinates = "..GarageCoordinatesLLDMS,20):ToGroup(ClientGroup)

 

MESSAGE:New("Predator is lasing Garage!\nPredator laser frequency = "..LaserFreqSu25T.."\nTarget Coordinates = "..GarageCoordinatesLLDMS,20):ToGroup(ClientGroup)

 

 


Edited by Hardcard
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...