mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress on SEAD model
This commit is contained in:
parent
846edca815
commit
a99924d9ed
@ -45,7 +45,6 @@ do -- TASK_SEAD
|
||||
self:F()
|
||||
|
||||
self.TargetSetUnit = TargetSetUnit
|
||||
self.TargetDistance = TargetDistance
|
||||
|
||||
Mission:AddTask( self )
|
||||
|
||||
@ -163,7 +162,9 @@ do -- TASK_SEAD
|
||||
-- @param #number RendezVousRange The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.
|
||||
function TASK_SEAD:SetRendezVousPointVec2( RendezVousPointVec2, RendezVousRange )
|
||||
|
||||
local ActRouteRendezVous = self:GetProcess( "RoutingToRendezVous", "RouteToRendezVousPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteRendezVous = ProcessUnit:GetProcess( "RoutingToRendezVous", "RouteToRendezVousPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
ActRouteRendezVous:SetPointVec2( RendezVousPointVec2 )
|
||||
ActRouteRendezVous:SetRange( RendezVousRange )
|
||||
end
|
||||
@ -173,7 +174,9 @@ do -- TASK_SEAD
|
||||
-- @return #number The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.
|
||||
function TASK_SEAD:GetRendezVousPointVec2()
|
||||
|
||||
local ActRouteRendezVous = self:GetProcess( "RoutingToRendezVous", "RouteToRendezVousPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteRendezVous = ProcessUnit:GetProcess( "RoutingToRendezVous", "RouteToRendezVousPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
return ActRouteRendezVous:GetPointVec2(), ActRouteRendezVous:GetRange()
|
||||
end
|
||||
|
||||
@ -183,14 +186,19 @@ do -- TASK_SEAD
|
||||
-- @param Core.Zone#ZONE_BASE RendezVousZone The Zone object where the RendezVous is located on the map.
|
||||
function TASK_SEAD:SetRendezVousZone( RendezVousZone )
|
||||
|
||||
local ActRouteRendezVous = self:GetProcess( "RoutingToRendezVous", "RouteToRendezVousZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteRendezVous = ProcessUnit:GetProcess( "RoutingToRendezVous", "RouteToRendezVousZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
ActRouteRendezVous:SetZone( RendezVousZone )
|
||||
end
|
||||
|
||||
--- @param #TASK_SEAD self
|
||||
-- @return Core.Zone#ZONE_BASE The Zone object where the RendezVous is located on the map.
|
||||
function TASK_SEAD:GetRendezVousZone()
|
||||
local ActRouteRendezVous = self:GetProcess( "RoutingToRendezVous", "RouteToRendezVousZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteRendezVous = ProcessUnit:GetProcess( "RoutingToRendezVous", "RouteToRendezVousZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
return ActRouteRendezVous:GetZone()
|
||||
end
|
||||
|
||||
@ -198,7 +206,9 @@ do -- TASK_SEAD
|
||||
-- @param Core.Point#POINT_VEC2 TargetPointVec2 The PointVec2 object where the Target is located on the map.
|
||||
function TASK_SEAD:SetTargetPointVec2( TargetPointVec2 )
|
||||
|
||||
local ActRouteTarget = self:GetProcess( "Engaging", "RouteToTargetPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteTarget = ProcessUnit:GetProcess( "Engaging", "RouteToTargetPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
ActRouteTarget:SetPointVec2( TargetPointVec2 )
|
||||
end
|
||||
|
||||
@ -206,7 +216,10 @@ do -- TASK_SEAD
|
||||
--- @param #TASK_SEAD self
|
||||
-- @return Core.Point#POINT_VEC2 The PointVec2 object where the Target is located on the map.
|
||||
function TASK_SEAD:GetTargetPointVec2()
|
||||
local ActRouteTarget = self:GetProcess( "Engaging", "RouteToTargetPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteTarget = ProcessUnit:GetProcess( "Engaging", "RouteToTargetPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
return ActRouteTarget:GetPointVec2()
|
||||
end
|
||||
|
||||
@ -215,7 +228,9 @@ do -- TASK_SEAD
|
||||
-- @param Core.Zone#ZONE_BASE TargetZone The Zone object where the Target is located on the map.
|
||||
function TASK_SEAD:SetTargetZone( TargetZone )
|
||||
|
||||
local ActRouteTarget = self:GetProcess( "Engaging", "RouteToTargetZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteTarget = ProcessUnit:GetProcess( "Engaging", "RouteToTargetZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
ActRouteTarget:SetZone( TargetZone )
|
||||
end
|
||||
|
||||
@ -223,7 +238,9 @@ do -- TASK_SEAD
|
||||
--- @param #TASK_SEAD self
|
||||
-- @return Core.Zone#ZONE_BASE The Zone object where the Target is located on the map.
|
||||
function TASK_SEAD:GetTargetZone()
|
||||
local ActRouteTarget = self:GetProcess( "Engaging", "RouteToTargetZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
local ProcessUnit = self:GetUnitProcess()
|
||||
|
||||
local ActRouteTarget = ProcessUnit:GetProcess( "Engaging", "RouteToTargetZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
return ActRouteTarget:GetZone()
|
||||
end
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170217_1332' )
|
||||
env.info( 'Moose Generation Timestamp: 20170303_1010' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170217_1332' )
|
||||
env.info( 'Moose Generation Timestamp: 20170303_1010' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -110,9 +110,8 @@ local TargetZone = ZONE:New( "Target Zone" )
|
||||
local SEADTask = TASK_SEAD:New(
|
||||
Mission,
|
||||
SEADSet,
|
||||
"SEAD Radars Vector 1",
|
||||
TargetSet,
|
||||
15000 ) -- Tasking.Task_SEAD#TASK_SEAD
|
||||
"SEAD Radars Vector 1"
|
||||
) -- Tasking.Task_SEAD#TASK_SEAD
|
||||
|
||||
SEADTask:SetRendezVousPointVec2( TargetZone:GetPointVec2(), 6000 ) -- Done to test the RendezVousPointVec2 mechanism.
|
||||
SEADTask:SetTargetZone( TargetZone )
|
||||
@ -129,8 +128,8 @@ SEADTask:SetTargetZone( TargetZone )
|
||||
|
||||
local SEADProcess = SEADTask:GetUnitProcess() -- #SEADProcess
|
||||
|
||||
SEADProcess:AddScoreProcess( "Accounting", "Account", "Account", "destroyed a radar", 25 )
|
||||
SEADProcess:AddScoreProcess( "Accounting", "Account", "Failed", "failed to destroy a radar", -10 )
|
||||
SEADProcess:AddScoreProcess( "Engaging", "Account", "Account", "destroyed a radar", 25 )
|
||||
SEADProcess:AddScoreProcess( "Engaging", "Account", "Failed", "failed to destroy a radar", -10 )
|
||||
|
||||
-- Now we will set the SCORING. Scoring is set using the TaskSEAD object.
|
||||
-- Scores can be set on the status of the Task, and on Process level.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user