Jump to content

Non-lethal Intercepts


Hallsy

Recommended Posts

Hi everyone,

I have been developing a server that has many randomly spawning events via script. To add to the diversity, I have been trying to find a way to simulate non-lethal intercepts. Are there any scripts out there that may allow for this? It would be great to interact with an airliner once you are within a distance and force it to rock wings or land through the F10. I have been relatively successful using triggers and MOOSE, but it is on a predetermined basis and very time-consuming. Some dynamism would be great. Could be a fun addon for RAT or other scripts.

Thanks!

Link to comment
Share on other sites

Not sure if it exists in some form or another but certainly possible if not a little complex to code to capture all fringe cases of use, but nice idea. Also, can you get the AI to wing rock? New to me and for sure going to get used in a childish way is its a thing lol

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

Link to comment
Share on other sites

  • 6 months later...

I'm bumping this because I have been desperately looking for something similar. No luck trying to use Moose and DML to try and get the desired impact (I am no expert). A way to intercept aircraft with prompting such as Lazur. I saw BigEyeEWR has a similar feature. It would be great to have intercepted aircraft (generated from a template) randomly comply with a command given through the F10 and divert to an airfield listed via list would be the dream. This kind of mundane operation would bring so much more variety to missions and realism!

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

This should work.

Intercept script:

-- Lua script for intercept and F10 map interaction
local interceptGroup = Group.getByName("InterceptGroup")  -- Replace "InterceptGroup" with the name of your intercepting group

if interceptGroup then
    local interceptorController = interceptGroup:getController()
    interceptorController:setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE_RED)

    -- Display a message using F10 menu
    local message = "Enemy aircraft detected. Intercept and proceed to destination."
    trigger.action.outTextForGroup(interceptGroup:getID(), message, 10)
end
F10 map function:

-- Lua script for F10 menu interaction
local interceptGroup = Group.getByName("InterceptGroup")  -- Replace "InterceptGroup" with the name of your intercepting group
local destinationZone = trigger.misc.getZone("DestinationZone")  -- Replace "DestinationZone" with the name of your destination zone

if interceptGroup and destinationZone then
    local interceptorController = interceptGroup:getController()

    -- Function to direct intercept group to a specific location
    local function directIntercept()
        local interceptTask = {
            id = 'ControlledTask',
            params = {
                task = {
                    id = 'Orbit',
                    params = {
                        pattern = AI.Task.OrbitPattern.CIRCLE,
                        point = destinationZone.point,
                        altitude = destinationZone.point.y,  -- Maintain current altitude
                        speed = 200,  -- Adjust speed as needed
                    },
                },
            },
        }

        interceptorController:setTask(interceptTask)

        -- Display a message using F10 menu
        local message = "Intercepting and proceeding to destination."
        trigger.action.outTextForGroup(interceptGroup:getID(), message, 10)
    end

    directIntercept()  -- Call the function immediately when the F10 menu item is selected
end
 

Link to comment
Share on other sites

On 1/31/2024 at 12:56 AM, Goose489 said:

This should work.

Intercept script:

-- Lua script for intercept and F10 map interaction
local interceptGroup = Group.getByName("InterceptGroup")  -- Replace "InterceptGroup" with the name of your intercepting group

if interceptGroup then
    local interceptorController = interceptGroup:getController()
    interceptorController:setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE_RED)

    -- Display a message using F10 menu
    local message = "Enemy aircraft detected. Intercept and proceed to destination."
    trigger.action.outTextForGroup(interceptGroup:getID(), message, 10)
end
F10 map function:

-- Lua script for F10 menu interaction
local interceptGroup = Group.getByName("InterceptGroup")  -- Replace "InterceptGroup" with the name of your intercepting group
local destinationZone = trigger.misc.getZone("DestinationZone")  -- Replace "DestinationZone" with the name of your destination zone

if interceptGroup and destinationZone then
    local interceptorController = interceptGroup:getController()

    -- Function to direct intercept group to a specific location
    local function directIntercept()
        local interceptTask = {
            id = 'ControlledTask',
            params = {
                task = {
                    id = 'Orbit',
                    params = {
                        pattern = AI.Task.OrbitPattern.CIRCLE,
                        point = destinationZone.point,
                        altitude = destinationZone.point.y,  -- Maintain current altitude
                        speed = 200,  -- Adjust speed as needed
                    },
                },
            },
        }

        interceptorController:setTask(interceptTask)

        -- Display a message using F10 menu
        local message = "Intercepting and proceeding to destination."
        trigger.action.outTextForGroup(interceptGroup:getID(), message, 10)
    end

    directIntercept()  -- Call the function immediately when the F10 menu item is selected
end
 

I will give this a shot tomorrow! Do you have a .miz with it running? Just so I can check how the functions work and templates have to be arranged in the editor.

On 1/31/2024 at 12:46 AM, Elphaba said:

I've created some scripts that do this. You never know how the AI pilot will respond when you pull along side and do a visual intercept. It's quite cool.

That sounds perfect! Would you be willing to share? 

Link to comment
Share on other sites

On 2/5/2024 at 3:43 AM, Hallsy said:

I will give this a shot tomorrow! Do you have a .miz with it running? Just so I can check how the functions work and templates have to be arranged in the editor.

That sounds perfect! Would you be willing to share? 

Not really, I'm making my own better and more flexible and mission creator friendly version of the big libraries out there. But I'm happy to talk you though that if you're able to do scripting. 

Link to comment
Share on other sites

5 hours ago, Elphaba said:

Not really, I'm making my own better and more flexible and mission creator friendly version of the big libraries out there. But I'm happy to talk you though that if you're able to do scripting. 

We can make something work. I am always ready to help with testing and large-scale implementation. I can help with some .lua if required.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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