mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Publish reworked missions with global variables
This commit is contained in:
parent
553ceb462e
commit
cd69b8a879
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -16,7 +16,7 @@ local CapPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
|
||||
AICapZone:SetControllable( CapPlane )
|
||||
|
||||
|
||||
Binary file not shown.
@ -15,11 +15,11 @@
|
||||
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
|
||||
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
|
||||
|
||||
local CapPlane = GROUP:FindByName( "Plane" )
|
||||
CapPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
|
||||
AICapZone:SetControllable( CapPlane )
|
||||
AICapZone:SetEngageRange( 20000 ) -- Set the Engage Range to 20.000 meters. The AI won't engage when the enemy is beyond 20.000 meters.
|
||||
|
||||
Binary file not shown.
@ -16,15 +16,15 @@
|
||||
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
|
||||
|
||||
|
||||
local CapPlane = GROUP:FindByName( "Plane" )
|
||||
CapPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
|
||||
local EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||
EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||
|
||||
local CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||
CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||
|
||||
AICapZone:SetControllable( CapPlane )
|
||||
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
||||
|
||||
Binary file not shown.
@ -17,15 +17,15 @@
|
||||
-- 4. When it engages, it will abort the engagement after 1 minute.
|
||||
|
||||
|
||||
local CapPlane = GROUP:FindByName( "Plane" )
|
||||
CapPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
|
||||
local EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||
EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||
|
||||
local CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||
CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||
|
||||
AICapZone:SetControllable( CapPlane )
|
||||
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
||||
@ -39,4 +39,5 @@ end
|
||||
function AICapZone:OnAfterAbort(Controllable,From,Event,To)
|
||||
BASE:E("MISSION ABORTED! Returning to Patrol Zone!")
|
||||
MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
@ -13,13 +13,13 @@
|
||||
-- 2. It should return to base when out of fuel.
|
||||
--
|
||||
|
||||
local CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding()
|
||||
CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding()
|
||||
|
||||
local CapGroup = CapSpawn:Spawn()
|
||||
CapGroup = CapSpawn:Spawn()
|
||||
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
|
||||
AICapZone:SetControllable( CapGroup )
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -24,24 +24,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
CASPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -25,24 +25,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
CASPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -26,24 +26,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
CASPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -24,24 +24,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
CASPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -28,24 +28,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
CASPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -26,24 +26,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Helicopter" )
|
||||
CASPlane = GROUP:FindByName( "Helicopter" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -25,24 +25,24 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Helicopter" )
|
||||
CASPlane = GROUP:FindByName( "Helicopter" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -28,26 +28,26 @@
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variables (in this case called CASPlane and CASHelicopters) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and "Helicopter" and assign to these variables
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
local CASHelicopter = GROUP:FindByName( "Helicopter" )
|
||||
CASPlane = GROUP:FindByName( "Plane" )
|
||||
CASHelicopter = GROUP:FindByName( "Helicopter" )
|
||||
|
||||
-- Create two patrol zones, one for the Planes and one for the Helicopters.
|
||||
local PatrolZonePlanes = ZONE:New( "Patrol Zone Planes" )
|
||||
local PatrolZoneHelicopters = ZONE:New( "Patrol Zone Helicopters" )
|
||||
PatrolZonePlanes = ZONE:New( "Patrol Zone Planes" )
|
||||
PatrolZoneHelicopters = ZONE:New( "Patrol Zone Helicopters" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZonePlanes = AI_CAS_ZONE:New( PatrolZonePlanes, 400, 500, 500, 2500, CASEngagementZone )
|
||||
local AICasZoneHelicopters = AI_CAS_ZONE:New( PatrolZoneHelicopters, 100, 250, 300, 1000, CASEngagementZone )
|
||||
AICasZonePlanes = AI_CAS_ZONE:New( PatrolZonePlanes, 400, 500, 500, 2500, CASEngagementZone )
|
||||
AICasZoneHelicopters = AI_CAS_ZONE:New( PatrolZoneHelicopters, 100, 250, 300, 1000, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
|
||||
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
|
||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
|
||||
-- This call will make the Cargo run to the CargoCarrier.
|
||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||
|
||||
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
|
||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
|
||||
-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is.
|
||||
InfantryCargo:Load( CargoCarrier )
|
||||
|
||||
Binary file not shown.
@ -1,10 +1,10 @@
|
||||
|
||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
|
||||
local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
||||
CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
||||
|
||||
local CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
||||
CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
||||
|
||||
-- This call will make the Cargo run to the CargoCarrier.
|
||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||
|
||||
Binary file not shown.
@ -1,13 +1,13 @@
|
||||
|
||||
local CargoSet = SET_BASE:New()
|
||||
CargoSet = SET_BASE:New()
|
||||
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
||||
|
||||
local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||
InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
|
||||
-- This call will make the Cargo run to the CargoCarrier.
|
||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||
|
||||
Binary file not shown.
@ -1,13 +1,13 @@
|
||||
|
||||
local CargoSet = SET_BASE:New()
|
||||
CargoSet = SET_BASE:New()
|
||||
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
||||
|
||||
local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||
InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
|
||||
-- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is.
|
||||
InfantryCargo:Load( CargoCarrier )
|
||||
|
||||
Binary file not shown.
@ -1,15 +1,15 @@
|
||||
|
||||
local CargoSet = SET_BASE:New()
|
||||
CargoSet = SET_BASE:New()
|
||||
CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) )
|
||||
CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) )
|
||||
|
||||
local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||
InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 )
|
||||
|
||||
local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
||||
CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
||||
|
||||
local CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
||||
CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
||||
|
||||
-- This call will make the Cargo run to the CargoCarrier.
|
||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||
|
||||
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
|
||||
local DeliveryUnit = UNIT:FindByName( "Delivery" )
|
||||
local Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 )
|
||||
DeliveryUnit = UNIT:FindByName( "Delivery" )
|
||||
Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
|
||||
-- This call will make the Cargo run to the CargoCarrier.
|
||||
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||
|
||||
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
|
||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||
|
||||
-- This will Load the Cargo into the Carrier, regardless where the Cargo is.
|
||||
InfantryCargo:Load( CargoCarrier )
|
||||
|
||||
Binary file not shown.
@ -17,8 +17,8 @@
|
||||
-- 4. The truck driving from the one group to the other, will leave the first area, and will join the second.
|
||||
-- 5. While driving in between the areas, it will have a separate area.
|
||||
|
||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
Binary file not shown.
@ -16,16 +16,16 @@
|
||||
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
||||
-- 2. Eventually all units should be detected by both JTAC.
|
||||
|
||||
local RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
local RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ" )
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
local RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||
RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||
|
||||
local RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||
RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
||||
|
||||
RecceDetection1:Start()
|
||||
@ -53,4 +53,4 @@ function RecceDetection2:OnAfterDetect(From,Event,To)
|
||||
local DetectionReport = RecceDetection2:DetectedReportDetailed()
|
||||
|
||||
HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" )
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
|
||||
|
||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 )
|
||||
local SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||
local DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 )
|
||||
SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||
DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart()
|
||||
|
||||
local FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection )
|
||||
FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -16,18 +16,18 @@
|
||||
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
||||
-- 2. Eventually all units should be detected by both JTAC.
|
||||
|
||||
local RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
local RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ" )
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
local RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||
RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 )
|
||||
|
||||
local RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||
RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 )
|
||||
|
||||
local ForestZone = ZONE_POLYGON:New( "ForestZone", GROUP:FindByName( "ForestZone" ) )
|
||||
ForestZone = ZONE_POLYGON:New( "ForestZone", GROUP:FindByName( "ForestZone" ) )
|
||||
|
||||
RecceDetection2:SetZoneProbability( { { ForestZone, 0.1 } } ) -- Set a 10% probability that a vehicle can be detected within the forest.
|
||||
|
||||
|
||||
Binary file not shown.
@ -16,13 +16,13 @@
|
||||
-- 1. Observe the detection reporting of both the Recce.
|
||||
-- 2. Eventually all units should be detected by both Recce.
|
||||
|
||||
local RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ" )
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
local RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
|
||||
Binary file not shown.
@ -18,13 +18,13 @@
|
||||
-- 1. Observe the detection reporting of both the Recce.
|
||||
-- 2. Eventually all units should be detected by both Recce.
|
||||
|
||||
local RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart()
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ" )
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
local RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
||||
RecceDetection = DETECTION_TYPES:New( RecceSetGroup )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
|
||||
Binary file not shown.
@ -16,17 +16,17 @@
|
||||
-- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first.
|
||||
-- 2. Eventually all units should be detected by both JTAC.
|
||||
|
||||
local RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
local RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart()
|
||||
RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart()
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ" )
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
local RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 )
|
||||
RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 )
|
||||
RecceDetection1:BoundDetectedZones()
|
||||
|
||||
local RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 )
|
||||
RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 )
|
||||
RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance.
|
||||
RecceDetection1:BoundDetectedZones()
|
||||
|
||||
|
||||
Binary file not shown.
@ -21,9 +21,9 @@
|
||||
-- 5. While driving in between the areas, it will have a separate area.
|
||||
-- 6. Observe the correct removal or relocation of the ZONEs.
|
||||
|
||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart()
|
||||
|
||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
|
||||
|
||||
Binary file not shown.
@ -16,14 +16,14 @@
|
||||
-- 2. When one Recce group detects a target, it will select an artillery unit and fire a missile.
|
||||
-- 3. This will run until all Recces have eliminated the targets.
|
||||
|
||||
local RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart()
|
||||
local ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart()
|
||||
RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart()
|
||||
ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart()
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ" )
|
||||
HQ = GROUP:FindByName( "HQ" )
|
||||
|
||||
local CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
CC = COMMANDCENTER:New( HQ, "HQ" )
|
||||
|
||||
local RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
RecceDetection = DETECTION_UNITS:New( RecceSetGroup )
|
||||
RecceDetection:SetDetectionInterval( 5 )
|
||||
|
||||
RecceDetection:Start()
|
||||
|
||||
Binary file not shown.
@ -17,9 +17,9 @@
|
||||
-- 2. Observe the smoking of the units detected
|
||||
-- 3. Observe the areas being flexibly changed very detection run.
|
||||
|
||||
local FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart()
|
||||
FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart()
|
||||
|
||||
local FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits()
|
||||
|
||||
|
||||
FACDetection:__Start( 5 )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@
|
||||
-- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging.
|
||||
-- 3. Check the contents of the fields of the S_EVENT_SHOT entry.
|
||||
|
||||
local Plane = UNIT:FindByName( "Plane" )
|
||||
Plane = UNIT:FindByName( "Plane" )
|
||||
|
||||
Plane:HandleEvent( EVENTS.Shot )
|
||||
|
||||
|
||||
Binary file not shown.
@ -13,9 +13,9 @@
|
||||
-- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging.
|
||||
-- 3. Check the contents of the fields of the S_EVENT_HIT entry.
|
||||
|
||||
local Plane = UNIT:FindByName( "Plane" )
|
||||
Plane = UNIT:FindByName( "Plane" )
|
||||
|
||||
local Tank = UNIT:FindByName( "Tank" )
|
||||
Tank = UNIT:FindByName( "Tank" )
|
||||
|
||||
Plane:HandleEvent( EVENTS.Hit )
|
||||
Tank:HandleEvent( EVENTS.Hit )
|
||||
|
||||
Binary file not shown.
@ -13,9 +13,9 @@
|
||||
-- 2. When the planes take-off, observe the message being sent.
|
||||
-- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file.
|
||||
|
||||
local PlaneAI = UNIT:FindByName( "PlaneAI" )
|
||||
PlaneAI = UNIT:FindByName( "PlaneAI" )
|
||||
|
||||
local PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
||||
PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
||||
|
||||
PlaneAI:HandleEvent( EVENTS.Takeoff )
|
||||
PlaneHuman:HandleEvent( EVENTS.Takeoff )
|
||||
|
||||
Binary file not shown.
@ -15,10 +15,10 @@
|
||||
-- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file.
|
||||
|
||||
-- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI".
|
||||
local PlaneAI = UNIT:FindByName( "PlaneAI" )
|
||||
PlaneAI = UNIT:FindByName( "PlaneAI" )
|
||||
|
||||
-- Create a SPAWN object to spawn a new plane once the hold one lands.
|
||||
local SpawnPlane = SPAWN:New( "SpawnPlaneAI" )
|
||||
SpawnPlane = SPAWN:New( "SpawnPlaneAI" )
|
||||
|
||||
-- Declare a new variable that will hold the new spawned SpawnPlaneAI
|
||||
local NewPlane
|
||||
|
||||
Binary file not shown.
@ -15,7 +15,7 @@
|
||||
-- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file.
|
||||
|
||||
-- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman".
|
||||
local PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
||||
PlaneHuman = UNIT:FindByName( "PlaneHuman" )
|
||||
|
||||
-- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else).
|
||||
PlaneHuman:HandleEvent( EVENTS.Crash )
|
||||
|
||||
Binary file not shown.
@ -15,7 +15,7 @@
|
||||
-- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile.
|
||||
-- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile.
|
||||
|
||||
local PlaneGroup = GROUP:FindByName( "Group Plane A" )
|
||||
PlaneGroup = GROUP:FindByName( "Group Plane A" )
|
||||
|
||||
PlaneGroup:HandleEvent( EVENTS.Shot )
|
||||
|
||||
|
||||
Binary file not shown.
@ -15,7 +15,7 @@
|
||||
-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit.
|
||||
-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit.
|
||||
|
||||
local TanksGroup = GROUP:FindByName( "Group Tanks A" )
|
||||
TanksGroup = GROUP:FindByName( "Group Tanks A" )
|
||||
|
||||
TanksGroup:HandleEvent( EVENTS.Hit )
|
||||
|
||||
|
||||
Binary file not shown.
@ -13,10 +13,10 @@
|
||||
-- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging.
|
||||
-- 3. The generic EventHandler objects should receive the hit events.
|
||||
|
||||
local CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" )
|
||||
CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" )
|
||||
|
||||
local EventHandler1 = EVENTHANDLER:New()
|
||||
local EventHandler2 = EVENTHANDLER:New()
|
||||
EventHandler1 = EVENTHANDLER:New()
|
||||
EventHandler2 = EVENTHANDLER:New()
|
||||
|
||||
EventHandler1:HandleEvent( EVENTS.Hit )
|
||||
EventHandler2:HandleEvent( EVENTS.Hit )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -15,9 +15,9 @@
|
||||
-- 4. Observe the tanks hitting the targets and the messages appear.
|
||||
-- 3. Check the contents of the fields of the S_EVENT_HIT entries.
|
||||
|
||||
local Plane = UNIT:FindByName( "Plane" )
|
||||
Plane = UNIT:FindByName( "Plane" )
|
||||
|
||||
local UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart()
|
||||
UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart()
|
||||
|
||||
UnitSet:HandleEvent( EVENTS.Hit )
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user