mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Documentation and embedding pictures in AI_CAS_ZONE
This commit is contained in:
@@ -39,7 +39,7 @@ function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
|
||||
|
||||
|
||||
PatrolZones[AIGroup] = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 400, 600 )
|
||||
PatrolZones[AIGroup] = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 400, 600 )
|
||||
PatrolZones[AIGroup]:ManageFuel( 0.2, 60 )
|
||||
PatrolZones[AIGroup]:SetControllable( AIGroup )
|
||||
PatrolZones[AIGroup]:__Start( 5 )
|
||||
|
||||
@@ -15,10 +15,10 @@ US_AI_Balancer = AI_BALANCER:New( US_PlanesClientSet, US_PlanesSpawn )
|
||||
|
||||
--local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Blue" )
|
||||
--local PatrolZoneBlue = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
|
||||
--local PatrolZoneB = AI_PATROLZONE:New( PatrolZoneBlue, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 )
|
||||
--local PatrolZoneB = AI_PATROL_ZONE:New( PatrolZoneBlue, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 )
|
||||
--US_AI_Balancer:SetPatrolZone( PatrolZoneB )
|
||||
--
|
||||
--local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Red" )
|
||||
--local PatrolZoneRed = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
|
||||
--local PatrolZoneR = AI_PATROLZONE:New( PatrolZoneRed, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 )
|
||||
--local PatrolZoneR = AI_PATROL_ZONE:New( PatrolZoneRed, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 )
|
||||
--RU_AI_Balancer:SetPatrolZone( PatrolZoneR )
|
||||
|
||||
@@ -38,7 +38,7 @@ function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
|
||||
|
||||
|
||||
local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 400, 600 )
|
||||
local Patrol = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 400, 600 )
|
||||
Patrol:ManageFuel( 0.2, 60 )
|
||||
Patrol:SetControllable( AIGroup )
|
||||
Patrol:__Start( 5 )
|
||||
|
||||
@@ -43,7 +43,7 @@ local PatrolZoneArray = { PatrolZone1, PatrolZone2 }
|
||||
|
||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
|
||||
local Patrol = AI_PATROLZONE:New( PatrolZoneArray[math.random( 1, 2 )], 3000, 6000, 400, 600 )
|
||||
local Patrol = AI_PATROL_ZONE:New( PatrolZoneArray[math.random( 1, 2 )], 3000, 6000, 400, 600 )
|
||||
Patrol:ManageFuel( 0.2, 60 )
|
||||
Patrol:SetControllable( AIGroup )
|
||||
Patrol:__Start( 5 )
|
||||
|
||||
@@ -35,7 +35,7 @@ local PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 )
|
||||
|
||||
function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
|
||||
local Patrol = AI_PATROLZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
local Patrol = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
Patrol:ManageFuel( 0.2, 60 )
|
||||
Patrol:SetControllable( AIGroup )
|
||||
Patrol:__Start( 5 )
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- This test mission models the behaviour of the AI_PATROLZONE class.
|
||||
-- This test mission models the behaviour of the AI_PATROL_ZONE class.
|
||||
--
|
||||
-- It creates a 2 AI_PATROLZONE objects with the name Patrol1 and Patrol2.
|
||||
-- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2.
|
||||
-- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h.
|
||||
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base.
|
||||
--
|
||||
@@ -23,16 +23,16 @@ local PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 )
|
||||
local PatrolSpawn = SPAWN:New( "Patrol Group" )
|
||||
local PatrolGroup = PatrolSpawn:Spawn()
|
||||
|
||||
local Patrol1 = AI_PATROLZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
local Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
Patrol1:ManageFuel( 0.2, 60 )
|
||||
Patrol1:SetControllable( PatrolGroup )
|
||||
Patrol1:__Start( 5 )
|
||||
|
||||
local Patrol2 = AI_PATROLZONE:New( PatrolZone2, 600, 1000, 300, 400 )
|
||||
local Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 )
|
||||
Patrol2:ManageFuel( 0.2, 0 )
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param #AI_PATROLZONE self
|
||||
-- @param #AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
-- @return #boolean If false is returned, then the OnAfter state transition function will not be called.
|
||||
function Patrol1:OnLeaveRTB( AIGroup )
|
||||
@@ -40,7 +40,7 @@ function Patrol1:OnLeaveRTB( AIGroup )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROLZONE self
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol1:OnAfterRTB( AIGroup )
|
||||
local NewGroup = PatrolSpawn:Spawn()
|
||||
@@ -49,14 +49,14 @@ function Patrol1:OnAfterRTB( AIGroup )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROLZONE self
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol1:OnEnterPatrol( AIGroup )
|
||||
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param #AI_PATROLZONE self
|
||||
-- @param #AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
-- @return #boolean If false is returned, then the OnEnter state transition function will not be called.
|
||||
function Patrol2:OnBeforeRTB( AIGroup )
|
||||
@@ -64,7 +64,7 @@ function Patrol2:OnBeforeRTB( AIGroup )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROLZONE self
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol2:OnEnterRTB( AIGroup )
|
||||
local NewGroup = PatrolSpawn:Spawn()
|
||||
@@ -73,7 +73,7 @@ function Patrol2:OnEnterRTB( AIGroup )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROLZONE self
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol2:OnEnterPatrol( AIGroup )
|
||||
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 )
|
||||
|
||||
Reference in New Issue
Block a user