mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
First version
This commit is contained in:
parent
59974ea33e
commit
4abdad5f35
1089
Moose Development/Moose/AI/AI_Escort.lua
Normal file
1089
Moose Development/Moose/AI/AI_Escort.lua
Normal file
File diff suppressed because it is too large
Load Diff
@ -136,6 +136,13 @@ function AI_FORMATION:New( FollowUnit, FollowGroupSet, FollowName, FollowBriefin
|
||||
self.FollowUnit = FollowUnit -- Wrapper.Unit#UNIT
|
||||
self.FollowGroupSet = FollowGroupSet -- Core.Set#SET_GROUP
|
||||
|
||||
self.FollowGroupSet:ForEachGroup(
|
||||
function( FollowGroup )
|
||||
self:E("Following")
|
||||
FollowGroup.Following = true
|
||||
end
|
||||
)
|
||||
|
||||
self:SetFlightRandomization( 2 )
|
||||
|
||||
self:SetStartState( "None" )
|
||||
@ -906,6 +913,31 @@ function AI_FORMATION:SetFlightRandomization( FlightRandomization ) --R2.1
|
||||
end
|
||||
|
||||
|
||||
--- This releases the air unit in your flight from the formation flight.
|
||||
-- @param #AI_FORMATION self
|
||||
-- @param Wrapper.Group#GROUP FollowGroup FollowGroup.
|
||||
-- @return #AI_FORMATION
|
||||
function AI_FORMATION:ReleaseFormation( FollowGroup )
|
||||
|
||||
FollowGroup.Following = false
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- This joins up the air unit in your formation flight.
|
||||
-- @param #AI_FORMATION self
|
||||
-- @param Wrapper.Group#GROUP FollowGroup FollowGroup.
|
||||
-- @return #AI_FORMATION
|
||||
function AI_FORMATION:JoinFormation( FollowGroup )
|
||||
|
||||
FollowGroup.Following = true
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Stop function. Formation will not be updated any more.
|
||||
-- @param #AI_FORMATION self
|
||||
-- @param Core.Set#SET_GROUP FollowGroupSet The following set of groups.
|
||||
@ -961,6 +993,8 @@ function AI_FORMATION:onenterFollowing( FollowGroupSet ) --R2.1
|
||||
-- @param Wrapper.Unit#UNIT ClientUnit
|
||||
function( FollowGroup, Formation, ClientUnit, CT1, CV1, CT2, CV2 )
|
||||
|
||||
if FollowGroup.Following == true then
|
||||
|
||||
FollowGroup:OptionROTEvadeFire()
|
||||
FollowGroup:OptionROEReturnFire()
|
||||
|
||||
@ -1065,6 +1099,7 @@ function AI_FORMATION:onenterFollowing( FollowGroupSet ) --R2.1
|
||||
FollowGroup:RouteToVec3( GDV_Formation, GS ) -- DCS models speed in Mps (Miles per second)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
self, ClientUnit, CT1, CV1, CT2, CV2
|
||||
)
|
||||
|
||||
@ -84,6 +84,7 @@ __Moose.Include( 'Scripts/Moose/AI/AI_Cap.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cas.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Bai.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Formation.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Escort.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_APC.lua' )
|
||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Helicopter.lua' )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user