diff --git a/OPS - PlayerTask/PlayerTask - 010 - Basics/PlayerTask - 010 - Basics.lua b/OPS - PlayerTask/PlayerTask - 010 - Basics/PlayerTask - 010 - Basics.lua new file mode 100644 index 0000000000..49428a773a --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 010 - Basics/PlayerTask - 010 - Basics.lua @@ -0,0 +1,59 @@ +------------------------------------------------------------------------- +-- PlayerTask 010 - Caucasus - Test Mission with manual target addition +------------------------------------------------------------------------- +-- Documentation +-- +-- PLAYERTASK: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.PlayerTask.html +-- +------------------------------------------------------------------------- +-- Join the game master slot initially, and then a plane slot after a few +-- seconds, to allow event capturing to start. Tasking is made available +-- over the F10 Menu +------------------------------------------------------------------------- +-- Date: August 2022 +------------------------------------------------------------------------- + +-- Settings +_SETTINGS:SetPlayerMenuOn() +_SETTINGS:SetImperial() +_SETTINGS:SetA2G_BR() + +-- Set up A2G task controller for the blue side named "82nd Airborne" +local taskmanager = PLAYERTASKCONTROLLER:New("82nd Airborne",coalition.side.BLUE,PLAYERTASKCONTROLLER.Type.A2G) + +-- Set the name for SRS and Menu to be "Mudder" +taskmanager:SetMenuName("Mudder") + +-- Manually add a GROUP as a target +taskmanager:AddTarget(GROUP:FindByName("Kobuleti Trucks")) + +-- Manually add an AIRBASE as a target +taskmanager:AddTarget(AIRBASE:FindByName(AIRBASE.Caucasus.Senaki_Kolkhi)) + +-- Manually add a COORDINATE as a target +taskmanager:AddTarget(GROUP:FindByName("Scout Coordinate"):GetCoordinate()) + +-- auto-add map markers when tasks are added +function taskmanager:OnAfterTaskAdded(From,Event,To,Task) + local task = Task -- Ops.PlayerTask#PLAYERTASK + local coord = task.Target:GetCoordinate() + local taskID = string.format("Task ID #%03d | Type: %s | Threat: %d",task.PlayerTaskNr,task.Type,task.Target:GetThreatLevelMax()) + local mark = MARKER:New(coord,taskID) + mark:ReadWrite() + mark:ToCoalition(taskmanager.Coalition) +end + +-- Function to explode trucks in Kobuleti +function killtrucks() + local coord = GROUP:FindByName("Kobuleti Trucks"):GetCoordinate() + GROUP:FindByName("Kobuleti Trucks"):Destroy(true) + coord:Explosion(10000) + coord:BigSmokeAndFireLarge() +end + +-- Timer for the trucks +local kaboom = TIMER:New(killtrucks) +kaboom:Start(600) + + + diff --git a/OPS - PlayerTask/PlayerTask - 010 - Basics/PlayerTask - 010 - Basics.miz b/OPS - PlayerTask/PlayerTask - 010 - Basics/PlayerTask - 010 - Basics.miz new file mode 100644 index 0000000000..14c1967b53 Binary files /dev/null and b/OPS - PlayerTask/PlayerTask - 010 - Basics/PlayerTask - 010 - Basics.miz differ diff --git a/OPS - PlayerTask/PlayerTask - 010 - Basics/pack.ps1 b/OPS - PlayerTask/PlayerTask - 010 - Basics/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 010 - Basics/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/OPS - PlayerTask/PlayerTask - 010 - Basics/unpack.ps1 b/OPS - PlayerTask/PlayerTask - 010 - Basics/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 010 - Basics/unpack.ps1 @@ -0,0 +1,7 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf +Remove-Item .\_unpacked -Force -Recurse +md "_unpacked" +cd "_unpacked" +. 7z x -r -y "..\$file.miz" * diff --git a/OPS - PlayerTask/PlayerTask - 020 - Detection/PlayerTask - 020 - Detection.lua b/OPS - PlayerTask/PlayerTask - 020 - Detection/PlayerTask - 020 - Detection.lua new file mode 100644 index 0000000000..db730e7f60 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 020 - Detection/PlayerTask - 020 - Detection.lua @@ -0,0 +1,59 @@ +------------------------------------------------------------------------- +-- PlayerTask 020 - Caucasus - Test Mission with detection +------------------------------------------------------------------------- +-- Documentation +-- +-- PLAYERTASK: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.PlayerTask.html +-- +------------------------------------------------------------------------- +-- Join the game master slot initially, and then a plane slot after a few +-- seconds, to allow event capturing to start. Tasking is made available +-- over the F10 Menu +------------------------------------------------------------------------- +-- Date: August 2022 +------------------------------------------------------------------------- + +-- Settings +_SETTINGS:SetPlayerMenuOn() +_SETTINGS:SetImperial() +_SETTINGS:SetA2G_BR() + +-- Set up A2G task controller for the blue side named "82nd Airborne" +local taskmanager = PLAYERTASKCONTROLLER:New("82nd Airborne",coalition.side.BLUE,PLAYERTASKCONTROLLER.Type.A2G) + +-- Set up detection with grup names containing "Blue Recce", these will add targets to our controller. Here's it's a Reaper Drone +taskmanager:SetupIntel("Blue Recce") +-- Add a single Recce group name "Blue Humvee" +taskmanager:AddAgent(GROUP:FindByName("Blue Humvee")) + +-- Set the menu to be calles Eagle Eye +taskmanager:SetMenuName("Eagle Eye") + +-- Add accept- and reject-zones for detection +taskmanager:AddAcceptZone(ZONE:New("AcceptZone")) +taskmanager:AddRejectZone(ZONE:FindByName("RejectZone")) + +-- auto-add map markers when tasks are added +function taskmanager:OnAfterTaskAdded(From,Event,To,Task) + local task = Task -- Ops.PlayerTask#PLAYERTASK + local coord = task.Target:GetCoordinate() + local taskID = string.format("Task ID #%03d | Type: %s | Threat: %d",task.PlayerTaskNr,task.Type,task.Target:GetThreatLevelMax()) + local mark = MARKER:New(coord,taskID) + mark:ReadWrite() + mark:ToCoalition(taskmanager.Coalition) +end + +-- Function to explode trucks in Kobuleti +function killtrucks() + local coord = GROUP:FindByName("Kobuleti Trucks"):GetCoordinate() + GROUP:FindByName("Kobuleti Trucks"):Destroy(true) + coord:Explosion(10000) + coord:BigSmokeAndFireLarge() +end + +-- Timer for the trucks +local kaboom = TIMER:New(killtrucks) +kaboom:Start(300) + + + diff --git a/OPS - PlayerTask/PlayerTask - 020 - Detection/PlayerTask - 020 - Detection.miz b/OPS - PlayerTask/PlayerTask - 020 - Detection/PlayerTask - 020 - Detection.miz new file mode 100644 index 0000000000..6ae0813952 Binary files /dev/null and b/OPS - PlayerTask/PlayerTask - 020 - Detection/PlayerTask - 020 - Detection.miz differ diff --git a/OPS - PlayerTask/PlayerTask - 020 - Detection/pack.ps1 b/OPS - PlayerTask/PlayerTask - 020 - Detection/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 020 - Detection/pack.ps1 @@ -0,0 +1,10 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf + +$dir +$file + +cd "_unpacked" +. 7z a -r -y -tzip "..\$file.miz" * +cd .. diff --git a/OPS - PlayerTask/PlayerTask - 020 - Detection/unpack.ps1 b/OPS - PlayerTask/PlayerTask - 020 - Detection/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 020 - Detection/unpack.ps1 @@ -0,0 +1,7 @@ +$dir = split-path -parent $MyInvocation.MyCommand.Definition +cd $dir +$file = Split-Path $dir -leaf +Remove-Item .\_unpacked -Force -Recurse +md "_unpacked" +cd "_unpacked" +. 7z x -r -y "..\$file.miz" *