diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua
index ea6a26b66..c129b2122 100644
--- a/Moose Development/Moose/Core/Point.lua
+++ b/Moose Development/Moose/Core/Point.lua
@@ -26,7 +26,11 @@
-- Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:
--
-- local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
---
+--
+-- ## 1.3) Create waypoints for routes
+--
+-- A POINT_VEC3 can prepare waypoints for Ground, Air and Naval groups to be embedded into a Route.
+--
--
-- ## 1.5) Smoke, flare, explode, illuminate
--
diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua
index b2459cce9..59f951f81 100644
--- a/Moose Development/Moose/Core/Zone.lua
+++ b/Moose Development/Moose/Core/Zone.lua
@@ -375,8 +375,6 @@ function ZONE_RADIUS:BoundZone( Points )
["heading"] = 0,
} -- end of ["group"]
- self:E( Tire )
-
coalition.addStaticObject( country.id.USA, Tire )
end
@@ -841,8 +839,6 @@ function ZONE_POLYGON_BASE:BoundZone( )
["heading"] = 0,
} -- end of ["group"]
- self:E( Tire )
-
coalition.addStaticObject( country.id.USA, Tire )
end
diff --git a/Moose Development/Moose/Functional/Escort.lua b/Moose Development/Moose/Functional/Escort.lua
index 247ede8b9..2f159a561 100644
--- a/Moose Development/Moose/Functional/Escort.lua
+++ b/Moose Development/Moose/Functional/Escort.lua
@@ -1089,7 +1089,7 @@ function ESCORT:_FollowScheduler()
self:T( { "Client Speed, Escort Speed, Speed, FollowDistance, Time:", CS, GS, Speed, FollowDistance, Time } )
-- Now route the escort to the desired point with the desired speed.
- self.EscortGroup:TaskRouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
+ self.EscortGroup:RouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
end
return true
diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua
index 0fe259cbf..a767de06f 100644
--- a/Moose Development/Moose/Wrapper/Controllable.lua
+++ b/Moose Development/Moose/Wrapper/Controllable.lua
@@ -1454,7 +1454,7 @@ end
-- @param Dcs.DCSTypes#Vec3 Point The destination point in Vec3 format.
-- @param #number Speed The speed to travel.
-- @return #CONTROLLABLE self
-function CONTROLLABLE:TaskRouteToVec2( Point, Speed )
+function CONTROLLABLE:RouteToVec2( Point, Speed )
self:F2( { Point, Speed } )
local ControllablePoint = self:GetUnit( 1 ):GetVec2()
@@ -1505,7 +1505,7 @@ end
-- @param Dcs.DCSTypes#Vec3 Point The destination point in Vec3 format.
-- @param #number Speed The speed to travel.
-- @return #CONTROLLABLE self
-function CONTROLLABLE:TaskRouteToVec3( Point, Speed )
+function CONTROLLABLE:RouteToVec3( Point, Speed )
self:F2( { Point, Speed } )
local ControllableVec3 = self:GetUnit( 1 ):GetVec3()
diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
index cf41a6dbb..a5cd68431 100644
--- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
+++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
-env.info( 'Moose Generation Timestamp: 20170305_1014' )
+env.info( 'Moose Generation Timestamp: 20170306_1142' )
local base = _G
Include = {}
@@ -6554,8 +6554,6 @@ function ZONE_RADIUS:BoundZone( Points )
["heading"] = 0,
} -- end of ["group"]
- self:E( Tire )
-
coalition.addStaticObject( country.id.USA, Tire )
end
@@ -7020,8 +7018,6 @@ function ZONE_POLYGON_BASE:BoundZone( )
["heading"] = 0,
} -- end of ["group"]
- self:E( Tire )
-
coalition.addStaticObject( country.id.USA, Tire )
end
@@ -10321,7 +10317,11 @@ end
-- Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:
--
-- local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
---
+--
+-- ## 1.3) Create waypoints for routes
+--
+-- A POINT_VEC3 can prepare waypoints for Ground, Air and Naval groups to be embedded into a Route.
+--
--
-- ## 1.5) Smoke, flare, explode, illuminate
--
@@ -14743,7 +14743,7 @@ end
-- @param Dcs.DCSTypes#Vec3 Point The destination point in Vec3 format.
-- @param #number Speed The speed to travel.
-- @return #CONTROLLABLE self
-function CONTROLLABLE:TaskRouteToVec2( Point, Speed )
+function CONTROLLABLE:RouteToVec2( Point, Speed )
self:F2( { Point, Speed } )
local ControllablePoint = self:GetUnit( 1 ):GetVec2()
@@ -14794,7 +14794,7 @@ end
-- @param Dcs.DCSTypes#Vec3 Point The destination point in Vec3 format.
-- @param #number Speed The speed to travel.
-- @return #CONTROLLABLE self
-function CONTROLLABLE:TaskRouteToVec3( Point, Speed )
+function CONTROLLABLE:RouteToVec3( Point, Speed )
self:F2( { Point, Speed } )
local ControllableVec3 = self:GetUnit( 1 ):GetVec3()
@@ -23049,7 +23049,7 @@ function ESCORT:_FollowScheduler()
self:T( { "Client Speed, Escort Speed, Speed, FollowDistance, Time:", CS, GS, Speed, FollowDistance, Time } )
-- Now route the escort to the desired point with the desired speed.
- self.EscortGroup:TaskRouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
+ self.EscortGroup:RouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
end
return true
diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua
index cf41a6dbb..a5cd68431 100644
--- a/Moose Mission Setup/Moose.lua
+++ b/Moose Mission Setup/Moose.lua
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
-env.info( 'Moose Generation Timestamp: 20170305_1014' )
+env.info( 'Moose Generation Timestamp: 20170306_1142' )
local base = _G
Include = {}
@@ -6554,8 +6554,6 @@ function ZONE_RADIUS:BoundZone( Points )
["heading"] = 0,
} -- end of ["group"]
- self:E( Tire )
-
coalition.addStaticObject( country.id.USA, Tire )
end
@@ -7020,8 +7018,6 @@ function ZONE_POLYGON_BASE:BoundZone( )
["heading"] = 0,
} -- end of ["group"]
- self:E( Tire )
-
coalition.addStaticObject( country.id.USA, Tire )
end
@@ -10321,7 +10317,11 @@ end
-- Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:
--
-- local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
---
+--
+-- ## 1.3) Create waypoints for routes
+--
+-- A POINT_VEC3 can prepare waypoints for Ground, Air and Naval groups to be embedded into a Route.
+--
--
-- ## 1.5) Smoke, flare, explode, illuminate
--
@@ -14743,7 +14743,7 @@ end
-- @param Dcs.DCSTypes#Vec3 Point The destination point in Vec3 format.
-- @param #number Speed The speed to travel.
-- @return #CONTROLLABLE self
-function CONTROLLABLE:TaskRouteToVec2( Point, Speed )
+function CONTROLLABLE:RouteToVec2( Point, Speed )
self:F2( { Point, Speed } )
local ControllablePoint = self:GetUnit( 1 ):GetVec2()
@@ -14794,7 +14794,7 @@ end
-- @param Dcs.DCSTypes#Vec3 Point The destination point in Vec3 format.
-- @param #number Speed The speed to travel.
-- @return #CONTROLLABLE self
-function CONTROLLABLE:TaskRouteToVec3( Point, Speed )
+function CONTROLLABLE:RouteToVec3( Point, Speed )
self:F2( { Point, Speed } )
local ControllableVec3 = self:GetUnit( 1 ):GetVec3()
@@ -23049,7 +23049,7 @@ function ESCORT:_FollowScheduler()
self:T( { "Client Speed, Escort Speed, Speed, FollowDistance, Time:", CS, GS, Speed, FollowDistance, Time } )
-- Now route the escort to the desired point with the desired speed.
- self.EscortGroup:TaskRouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
+ self.EscortGroup:RouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second)
end
return true
diff --git a/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.lua b/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.lua
index b45814d10..28186f64c 100644
--- a/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.lua
+++ b/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.lua
@@ -18,9 +18,9 @@ local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" )
local Scoring = SCORING:New( "Shooting Range 1" )
-Scoring:SetMultiplierDestroyScore( 10 )
+Scoring:SetScaleDestroyScore( 10 )
-Scoring:SetMultiplierDestroyPenalty( 40 )
+Scoring:SetScaleDestroyPenalty( 40 )
Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 )
@@ -35,4 +35,4 @@ Scoring:AddZoneScore( ShootingRangeZone, 200 )
local SceneryZone = ZONE:New( "ScoringZone2" )
Scoring:AddZoneScore( SceneryZone, 200 )
-
+Scoring:AddStaticScore(STATIC:FindByName( "Shooting Range #010" ), 100 )
diff --git a/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.miz b/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.miz
index 07d3ee53e..f5086c9c7 100644
Binary files a/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.miz and b/Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100 - Scoring of Statics.miz differ
diff --git a/Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz b/Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz
index a729ae25e..565eb3aec 100644
Binary files a/Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz and b/Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz differ
diff --git a/Moose Test Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua b/Moose Test Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua
new file mode 100644
index 000000000..1a4c15294
--- /dev/null
+++ b/Moose Test Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua
@@ -0,0 +1,139 @@
+---
+-- Name: SCO-500 - Scoring Multi Player Demo Mission 1
+-- Author: Pikey and FlightControl
+-- Date Created: 1 Mar 2017
+--
+-- # Situation:
+--
+-- A demo mission for the scoring. Read the briefing and have fun.
+--
+-- # Test cases:
+--
+-- 1. Observe the scoring granted to your flight when you hit and kill targets.
+
+-- Define the patrol zones
+local BlueCapZone = ZONE_POLYGON:New( "BlueCapZone", GROUP:FindByName( "Blue CAP Zone Patrol" ) )
+local RedCapZone = ZONE_POLYGON:New( "RedCapZone", GROUP:FindByName( "Red CAP Zone Patrol" ) )
+
+-- Define the engage zones
+local BlueEngageZone = ZONE_POLYGON:New( "BlueEngageZone", GROUP:FindByName( "Blue CAP Zone Engage" ) )
+local RedEngageZone = ZONE_POLYGON:New( "RedEngageZone", GROUP:FindByName( "Red CAP Zone Engage" ) )
+
+-- Define the Spawn zones for ground vehicles
+local BlueSpawnGroundZone = ZONE_POLYGON:New( "BlueSpawnGroundZone", GROUP:FindByName( "Blue Spawn Zone" ) )
+--local RedSpawnGroundZone = ZONE_POLYGON:New( "RedSpawnGroundZone", GROUP:FindByName( "Red Spawn Zone" ) )
+
+local RedSpawnGroundZone = ZONE:New( "Red Spawn Zone" )
+
+-- Define the Scoring zones that define the shelters
+local BlueShelterZone = ZONE_POLYGON:New( "Blue Shelters", GROUP:FindByName( "Blue Shelters" ) )
+local RedShelterZone = ZONE_POLYGON:New( "Red Shelters", GROUP:FindByName( "Red Shelters" ) )
+
+-- Define the Set of Clients that are used for the AI Balancers
+local BluePlanesClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterCategories( "plane" ):FilterPrefixes( "Blue Player")
+local RedPlanesClientSet = SET_CLIENT:New():FilterCoalitions( "red" ):FilterCategories( "plane" ):FilterPrefixes( "Red Player")
+
+-- Define the Spawn objects for the AI planes
+local BluePlanesSpawn = SPAWN:New( "BlueAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 )
+local RedPlanesSpawn = SPAWN:New( "RedAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 )
+
+-- Define the AI Balancers for the planes
+local BlueAIB = AI_BALANCER:New( BluePlanesClientSet, BluePlanesSpawn ):InitSpawnInterval( 60, 1200 )
+local RedAIB = AI_BALANCER:New( RedPlanesClientSet, RedPlanesSpawn ):InitSpawnInterval( 60, 1200 )
+
+-- Define the Spawn objects for the airbase defenses
+local BlueAirbaseDefense1Spawn = SPAWN:New( "Blue Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 )
+local BlueAirbaseDefense2Spawn = SPAWN:New( "Blue Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 )
+local RedAirbaseDefense1Spawn = SPAWN:New( "Red Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 )
+local RedAirbaseDefense2Spawn = SPAWN:New( "Red Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 )
+
+-- Define the ground forces spawning engines...
+
+-- First define the template arrays.
+local BlueGroundTemplates = { "Blue Ground Forces 1", "Blue Ground Forces 2", "Blue Ground Forces 3" }
+local RedGroundTemplates = { "Red Ground Forces 2", "Red Ground Forces 2", "Red Ground Forces 3" }
+
+-- New we are using these templates to define the spawn objects for the ground forces.
+-- We spawn them at random places into the define zone.
+local BlueGroundSpawn = SPAWN
+ :New( "Blue Ground Forces" )
+ :InitLimit( 12, 30 )
+ :InitRandomizeZones( { BlueSpawnGroundZone } )
+ :InitRandomizeTemplate( BlueGroundTemplates )
+ :SpawnScheduled( 60, 0.2 )
+
+local RedGroundSpawn = SPAWN
+ :New( "Red Ground Forces" )
+ :InitLimit( 12, 30 )
+ :InitRandomizeTemplate( RedGroundTemplates )
+ :InitRandomizeZones( { RedSpawnGroundZone } )
+ :SpawnScheduled( 60, 0.2 )
+
+
+
+local BlueCap = {}
+local RedCap = {}
+
+-- Define the OnAfterSpawned events of the AI balancer Spawn Groups
+function BlueAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
+ if AIGroup then
+ BlueCap[AIGroup] = BlueCap[AIGroup] or AI_CAP_ZONE:New( BlueCapZone, 500, 3000, 450, 1200 )
+ local Cap = BlueCap[AIGroup] -- AI.AI_CAP#AI_CAP_ZONE
+
+ Cap:ManageFuel( 0.4, 180 )
+ Cap:SetEngageZone( BlueEngageZone )
+ Cap:SetControllable( AIGroup )
+ Cap:Start()
+ end
+end
+
+function RedAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
+
+ if AIGroup then
+ RedCap[AIGroup] = RedCap[AIGroup] or AI_CAP_ZONE:New( RedCapZone, 500, 3000, 450, 1200 )
+ local Cap = RedCap[AIGroup] -- AI.AI_CAP#AI_CAP_ZONE
+
+ Cap:ManageFuel( 0.4, 180 )
+ Cap:SetEngageZone( BlueEngageZone )
+ Cap:SetControllable( AIGroup )
+ Cap:Start()
+ end
+end
+
+
+
+
+-- Okay, now that we defined all this stuff, now make the SCORING setup ...
+
+-- First define a Scoring object
+local Scoring = SCORING:New( "SCO-500 - Scoring Demonstration Mission" )
+
+-- Define within the scoring the shelter designated targets.
+Scoring:AddZoneScore( BlueShelterZone, 50 ) -- Per shelter destroyed, 50 extra points are granted.
+Scoring:AddZoneScore( RedShelterZone, 50 ) -- Per shelter destroyed, 50 extra points are granted.
+
+-- Define the static objects that give extra scores
+Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 1"), 100 )
+Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 2"), 100 )
+Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 3"), 100 )
+Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 4"), 100 )
+
+Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #001"), 80 )
+Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #002"), 80 )
+Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #003"), 80 )
+Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #004"), 80 )
+
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 1" ), 100 )
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 2" ), 100 )
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 3" ), 100 )
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 4" ), 100 )
+
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #001" ), 80 )
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #002" ), 80 )
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #003" ), 80 )
+Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #004" ), 80 )
+
+-- Scale the scoring rewarded.
+Scoring:SetScaleDestroyScore( 30 )
+Scoring:SetScaleDestroyPenalty( 90 ) -- Penalties are punished more than normal destroys.
+
diff --git a/Moose Test Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz b/Moose Test Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz
new file mode 100644
index 000000000..a1de2242c
Binary files /dev/null and b/Moose Test Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz differ
diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html
index 3d4f402b1..51fe4286e 100644
--- a/docs/Documentation/AI_Patrol.html
+++ b/docs/Documentation/AI_Patrol.html
@@ -881,6 +881,9 @@ Use the method AIPATROLZONE.M
+
+ This table contains the targets detected during patrol.
diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html
index 59202c294..efcd3f237 100644
--- a/docs/Documentation/Cargo.html
+++ b/docs/Documentation/Cargo.html
@@ -2425,6 +2425,7 @@ The UNIT carrying the package.
(AIR) Return the Controllable to an Airbase#AIRBASE A speed can be given in km/h.
+(AIR + GROUND) Make the Controllable move to fly to a given point.
+(AIR + GROUND) Make the Controllable move to a given point.
Return a Misson task to follow a given route defined by Points.
-(AIR + GROUND) Make the Controllable move to fly to a given point.
-(AIR + GROUND) Make the Controllable move to a given point.
(AIR + GROUND) Make the Controllable move to fly to a given point.
+ +Dcs.DCSTypes#Vec3 Point :
+The destination point in Vec3 format.
#number Speed :
+The speed to travel.
#CONTROLLABLE: +self
+ +(AIR + GROUND) Make the Controllable move to a given point.
+ +Dcs.DCSTypes#Vec3 Point :
+The destination point in Vec3 format.
#number Speed :
+The speed to travel.
#CONTROLLABLE: +self
+ +(AIR + GROUND) Make the Controllable move to fly to a given point.
- -Dcs.DCSTypes#Vec3 Point :
-The destination point in Vec3 format.
#number Speed :
-The speed to travel.
#CONTROLLABLE: -self
- -(AIR + GROUND) Make the Controllable move to a given point.
- -Dcs.DCSTypes#Vec3 Point :
-The destination point in Vec3 format.
#number Speed :
-The speed to travel.
#CONTROLLABLE: -self
- local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
+A POINT_VEC3 can prepare waypoints for Ground, Air and Naval groups to be embedded into a Route.
+Finds a STATIC from the _DATABASE using the relevant Static Name.
As an optional parameter, a briefing text can be given also.
-#string StaticName :
Name of the DCS Static as defined within the Mission Editor.
#boolean RaiseError :
+Raise an error if not found.
ZONE_BASE