diff --git a/OPS - PlayerTask/PlayerTask - 041 - Static Targets/PlayerTask - 041 - Static Targets.miz b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/PlayerTask - 041 - Static Targets.miz new file mode 100644 index 0000000000..f00fb76bad Binary files /dev/null and b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/PlayerTask - 041 - Static Targets.miz differ diff --git a/OPS - PlayerTask/PlayerTask - 041 - Static Targets/PlayerTask - 041 -Static Targets.lua b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/PlayerTask - 041 -Static Targets.lua new file mode 100644 index 0000000000..def20949c3 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/PlayerTask - 041 -Static Targets.lua @@ -0,0 +1,70 @@ +------------------------------------------------------------------------- +-- PlayerTask 041 - Caucasus - Test Mission with static targets +------------------------------------------------------------------------- +-- 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. +-- +-- Join one of bombing tasks. +-- +-- Listen to AM 130 or 255 on SRS for messages. Change path below. +------------------------------------------------------------------------- +-- Date: October 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 menu to be called Eagle Eye +taskmanager:SetMenuName("Eagle Eye") + +-- Set up using SRS +local hereSRSPath = "C:\\Program Files\\DCS-SimpleRadio-Standalone" -- location of the SRS installation folder, not the double \ +local hereSRSPort = 5002 -- SRS server listening to port 5002 + +-- Set controller to use radio 130 and 255 AM, female voice, GB english, use "Microsoft Hazel" as voice pack (must be installed on your machine), volume 70%. +taskmanager:SetSRS({130,255},{radio.modulation.AM,radio.modulation.AM},hereSRSPath,"female","en-GB",hereSRSPort,"Microsoft Hazel Desktop",0.7) + +-- Controller will announce itself after 60 seconds, on these two broadcast frequencies, when a new player joins +taskmanager:SetSRSBroadcast({127.5,305},{radio.modulation.AM,radio.modulation.AM}) + +-- Add a static as a target - here, a TV Tower +local target = STATIC:FindByName("Radiotower") +local newtask2 = PLAYERTASK:New(AUFTRAG.Type.BOMBING,target,true,3,"Bombing") +-- Briefing +newtask2:AddFreetext("Find and neutralize the TV tower!") +-- Menu name of this task +newtask2:SetMenuName("Neutralize TV Tower") + +-- add custom success function - if the tower is dead or lost 80% of its lifepoints, we're done. +newtask2:AddConditionSuccess( + function(static) + if (not static) or static:GetLife() < 1 or static:GetLife() < 0.2* static:GetLife0() then + return true + else + return false + end + end, target +) +taskmanager:AddPlayerTaskToQueue(newtask2) + +-- 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 + diff --git a/OPS - PlayerTask/PlayerTask - 041 - Static Targets/pack.ps1 b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/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 - 041 - Static Targets/unpack.ps1 b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 041 - Static Targets/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 - 042 - Scenery Targets/PlayerTask - 042 - Scenery Targets.lua b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/PlayerTask - 042 - Scenery Targets.lua new file mode 100644 index 0000000000..3ba71d78b8 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/PlayerTask - 042 - Scenery Targets.lua @@ -0,0 +1,64 @@ +------------------------------------------------------------------------- +-- PlayerTask 042 - Caucasus - Test Mission with scenery (map object) targets +------------------------------------------------------------------------- +-- 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. +-- +-- Join the bombing task "Bomb Bridge". Bridges are near Poti on the map. +-- +-- Listen to AM 130 or 255 on SRS for messages. Change path below. +------------------------------------------------------------------------- +-- Date: October 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 menu to be called Eagle Eye +taskmanager:SetMenuName("Eagle Eye") + +-- Set up using SRS +local hereSRSPath = "C:\\Program Files\\DCS-SimpleRadio-Standalone" -- location of the SRS installation folder, not the double \ +local hereSRSPort = 5002 -- SRS server listening to port 5002 + +-- Set controller to use radio 130 and 255 AM, female voice, GB english, use "Microsoft Hazel" as voice pack (must be installed on your machine), volume 70%. +taskmanager:SetSRS({130,255},{radio.modulation.AM,radio.modulation.AM},hereSRSPath,"female","en-GB",hereSRSPort,"Microsoft Hazel Desktop",0.7) + +-- Controller will announce itself after 60 seconds, on these two broadcast frequencies, when a new player joins +taskmanager:SetSRSBroadcast({127.5,305},{radio.modulation.AM,radio.modulation.AM}) + +-- create set of zones with the eight bridge component references +local bridges = SET_ZONE:New():FilterPrefixes("Quai"):FilterOnce() +-- build a SET_SCENERY containing the bridges' SCENERY objects +local scenset = SET_SCENERY:New(bridges) +-- create a task +local scenerytask = PLAYERTASK:New(AUFTRAG.Type.BOMBING,scenset,true,2,"Bombing") +-- Menu name of this task +scenerytask:SetMenuName("Bomb bridge") +-- Briefing +scenerytask:AddFreetext("Find and destroy the bridges over the River Quai!") + +taskmanager:AddPlayerTaskToQueue(scenerytask) + +-- Blow up one bridge component +local scenery = SCENERY:FindByZoneName("Quai-2") + +function DestroyBridgeComponent() + scenery:GetCoordinate():Explosion(500,2) +end + +local BridgeTimer=TIMER:New(DestroyBridgeComponent) +BridgeTimer:Start(60) + + diff --git a/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/PlayerTask - 042 - Scenery Targets.miz b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/PlayerTask - 042 - Scenery Targets.miz new file mode 100644 index 0000000000..0ce2a31a84 Binary files /dev/null and b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/PlayerTask - 042 - Scenery Targets.miz differ diff --git a/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/pack.ps1 b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/pack.ps1 new file mode 100644 index 0000000000..bbac66e7c1 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/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 - 042 - Scenery Targets/unpack.ps1 b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/unpack.ps1 new file mode 100644 index 0000000000..c208a31858 --- /dev/null +++ b/OPS - PlayerTask/PlayerTask - 042 - Scenery Targets/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" *