Module AI_Formation
AI -- (R2.1) Build large formations of AI Groups flying together.
AI_FORMATION makes AI GROUPs fly in formation of various compositions. The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!! The purpose of the class is to:
- Make formation building a process that can be managed while in flight, rather than a task.
- Human players can guide formations, consisting of larget planes.
- Build large formations (like a large bomber field).
- Form formations that DCS does not support off the shelve.
A few remarks:
- Depending on the type of plane, the change in direction by the leader may result in the formation getting disentangled while in flight and needs to be rebuild.
- Formations are vulnerable to collissions, but is depending on the type of plane, the distance between the planes and the speed and angle executed by the leader.
- Formations may take a while to build up.
As a result, the AI_FORMATION is not perfect, but is very useful to:
- Model large formations when flying straight line.
- Make humans guide a large formation, when the planes are wide from each other.
There are the following types of classes defined:
- #AI_FORMATION: Create a formation from several GROUPs.
Demo Missions
AI_FORMATION Demo Missions source code
AI_FORMATION Demo Missions, only for beta testers
ALL Demo Missions pack of the last release
YouTube Channel
AUTHORS and CONTRIBUTIONS
Contributions:
Authors:
- FlightControl: Concept, Design & Programming.
Global(s)
| AI_FORMATION |
AI_FORMATION class, extends Fsm#FSM_SETThe #AI_FORMATION class allows you to build large formations, make AI follow a Client#CLIENT (player) leader or a Unit#UNIT (AI) leader. |
Type AI_FORMATION
Type AI_FORMATION.MODE
| AI_FORMATION.MODE.FOLLOW | |
| AI_FORMATION.MODE.MISSION |
Type MENUPARAM
| MENUPARAM.ParamDistance | |
| MENUPARAM.ParamFunction | |
| MENUPARAM.ParamMessage | |
| MENUPARAM.ParamSelf |
Global(s)
- #AI_FORMATION AI_FORMATION
-
AI_FORMATION class, extends Fsm#FSM_SET
The #AI_FORMATION class allows you to build large formations, make AI follow a Client#CLIENT (player) leader or a Unit#UNIT (AI) leader.
AI_FORMATION makes AI GROUPs fly in formation of various compositions. The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!! The purpose of the class is to:
- Make formation building a process that can be managed while in flight, rather than a task.
- Human players can guide formations, consisting of larget planes.
- Build large formations (like a large bomber field).
- Form formations that DCS does not support off the shelve.
A few remarks:
- Depending on the type of plane, the change in direction by the leader may result in the formation getting disentangled while in flight and needs to be rebuild.
- Formations are vulnerable to collissions, but is depending on the type of plane, the distance between the planes and the speed and angle executed by the leader.
- Formations may take a while to build up.
As a result, the AI_FORMATION is not perfect, but is very useful to:
- Model large formations when flying straight line. You can build close formations when doing this.
- Make humans guide a large formation, when the planes are wide from each other.
AI_FORMATION construction
Create a new SPAWN object with the AI_FORMATION.New method:
- Follow#AI_FORMATION.New(): Creates a new AI_FORMATION object from a Group#GROUP for a Client#CLIENT or a Unit#UNIT, with an optional briefing text.
Formation methods
The following methods can be used to set or change the formation:
- AIFormation#AIFORMATION.FormationLine(): Form a line formation (core formation function).
- AIFormation#AIFORMATION.FormationTrail(): Form a trail formation.
- AIFormation#AIFORMATION.FormationLeftLine(): Form a left line formation.
- AIFormation#AIFORMATION.FormationRightLine(): Form a right line formation.
- AIFormation#AIFORMATION.FormationRightWing(): Form a right wing formation.
- AIFormation#AIFORMATION.FormationLeftWing(): Form a left wing formation.
- AIFormation#AIFORMATION.FormationCenterWing(): Form a center wing formation.
- AIFormation#AIFORMATION.FormationCenterVic(): Form a Vic formation (same as CenterWing.
- AIFormation#AIFORMATION.FormationCenterBoxed(): Form a center boxed formation.
Randomization
Use the method AIFormation#AIFORMATION.SetFlightRandomization() to simulate the formation flying errors that pilots make while in formation. Is a range set in meters.
Usage:
local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() FollowGroupSet:Flush() local LeaderUnit = UNIT:FindByName( "Leader" ) local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" ) LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 ) LargeFormation:__Start( 1 )
Type AI_Formation
Type AI_FORMATION
AI_FORMATION class
Field(s)
- #number AI_FORMATION.FollowDistance
-
The current follow distance.
- #AI_FORMATION.MODE AI_FORMATION.FollowMode
-
The mode the escort is in.
- #string AI_FORMATION.FollowName
- Scheduler#SCHEDULER AI_FORMATION.FollowScheduler
-
The instance of the SCHEDULER class.
- AI_FORMATION:FormationBox(XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels)
-
FormationBox Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group. -
#number ZLevels: The amount of levels on the Z-axis.
-
- AI_FORMATION:FormationCenterWing(XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationCenterWing Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:FormationLeftLine(XStart, YStart, ZStart, ZSpace)
-
FormationLeftLine Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:FormationLeftWing(XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationLeftWing Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:FormationLine(XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationLine Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:FormationRightLine(XStart, YStart, ZStart, ZSpace)
-
FormationRightLine Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:FormationRightWing(XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationRightWing Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:FormationStack(XStart, XSpace, YStart, YSpace)
-
FormationStack Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group.
-
- AI_FORMATION:FormationTrail(XStart, XSpace, YStart)
-
FormationTrail Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group.
-
- AI_FORMATION:FormationVic(XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationVic Trigger for AI_FORMATION
Parameters
-
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:New(FollowUnit, FollowGroupSet, FollowName, FollowBriefing)
-
AI_FORMATION class constructor for an AI group
Parameters
-
Unit#UNIT FollowUnit: The UNIT leading the FolllowGroupSet. -
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string FollowName: Name of the escort. -
FollowBriefing:
Return value
#AI_FORMATION: self
-
- AI_FORMATION:OnAfterFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels)
-
FormationBox Handler OnAfter for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group. -
#number ZLevels: The amount of levels on the Z-axis.
-
- AI_FORMATION:OnAfterFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationCenterWing Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace)
-
FormationLeftLine Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationLeftWing Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationLine Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace)
-
FormationRightLine Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationRightWing Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationStack(From, Event, To, XStart, XSpace, YStart, YSpace)
-
FormationStack Handler OnAfter for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group.
-
- AI_FORMATION:OnAfterFormationTrail(From, Event, To, XStart, XSpace, YStart)
-
FormationTrail Handler OnAfter for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group.
-
- AI_FORMATION:OnAfterFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationVic Handler OnAfter for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:OnBeforeFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels)
-
FormationBox Handler OnBefore for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group. -
#number ZLevels: The amount of levels on the Z-axis.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationCenterWing Handler OnBefore for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace)
-
FormationLeftLine Handler OnBefore for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationLeftWing Handler OnBefore for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationLine Handler OnBefore for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace)
-
FormationRightLine Handler OnBefore for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationRightWing Handler OnBefore for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationStack(From, Event, To, XStart, XSpace, YStart, YSpace)
-
FormationStack Handler OnBefore for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationTrail(From, Event, To, XStart, XSpace, YStart)
-
FormationTrail Handler OnBefore for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group.
Return value
#boolean:
-
- AI_FORMATION:OnBeforeFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationVic Handler OnBefore for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
#boolean:
-
- DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT AI_FORMATION.OptionReactionOnThreat
-
Which REACTIONONTHREAT is set to the FollowGroup.
- #boolean AI_FORMATION.ReportTargets
-
If true, nearby targets are reported.
- AI_FORMATION:SetFlightRandomization(FlightRandomization)
-
Use the method AIFormation#AIFORMATION.SetFlightRandomization() to make the air units in your formation randomize their flight a bit while in formation.
Parameter
-
#number FlightRandomization: The formation flying errors that pilots can make while in formation. Is a range set in meters.
Return value
-
- AI_FORMATION:TestSmokeDirectionVector(SmokeDirection)
-
This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.
This allows to visualize where the escort is flying to.
Parameter
-
#boolean SmokeDirection: If true, then the direction vector will be smoked.
Return value
-
- AI_FORMATION:__FormationBox(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels)
-
FormationBox Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group. -
#number ZLevels: The amount of levels on the Z-axis.
-
- AI_FORMATION:__FormationCenterWing(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationCenterWing Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationLeftLine(Delay, XStart, YStart, ZStart, ZSpace)
-
FormationLeftLine Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationLeftWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationLeftWing Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationLine(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationLine Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationRightLine(Delay, XStart, YStart, ZStart, ZSpace)
-
FormationRightLine Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationRightWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationRightWing Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationStack(Delay, XStart, XSpace, YStart, YSpace)
-
FormationStack Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group.
-
- AI_FORMATION:__FormationTrail(Delay, XStart, XSpace, YStart)
-
FormationTrail Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group.
-
- AI_FORMATION:__FormationVic(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationVic Asynchronous Trigger for AI_FORMATION
Parameters
-
#number Delay: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:onafterFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels, FollowGroupSet)
-
FormationBox Handler OnAfter for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group. -
#number ZLevels: The amount of levels on the Z-axis. -
FollowGroupSet:
Return value
-
- AI_FORMATION:onafterFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationCenterWing Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:onafterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace)
-
FormationLeftLine Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
-
- AI_FORMATION:onafterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace)
-
FormationLeftWing Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
-
- AI_FORMATION:onafterFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace)
-
FormationLine Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
-
- AI_FORMATION:onafterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace)
-
FormationRightLine Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group.
Return value
-
- AI_FORMATION:onafterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace)
-
Parameters
-
FollowGroupSet: -
From: -
Event: -
To: -
XStart: -
XSpace: -
YStart: -
ZStart: -
ZSpace:
-
- AI_FORMATION:onafterFormationStack(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace)
-
FormationStack Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group.
Return value
-
- AI_FORMATION:onafterFormationTrail(FollowGroupSet, From, Event, To, XStart, XSpace, YStart)
-
FormationTrail Handler OnAfter for AI_FORMATION
Parameters
-
Core.Set#SET_GROUP FollowGroupSet: The group AI escorting the FollowUnit. -
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group.
Return value
-
- AI_FORMATION:onafterFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, FollowGroupSet)
-
FormationVic Handle for AI_FORMATION
Parameters
-
#string From: -
#string Event: -
#string To: -
#number XStart: The start position on the X-axis in meters for the first group. -
#number XSpace: The space between groups on the X-axis in meters for each sequent group. -
#nubmer YStart: The start position on the Y-axis in meters for the first group. -
#number YSpace: The space between groups on the Y-axis in meters for each sequent group. -
#nubmer ZStart: The start position on the Z-axis in meters for the first group. -
#number ZSpace: The space between groups on the Z-axis in meters for each sequent group. -
FollowGroupSet:
Return value
-
- AI_FORMATION:onenterFollowing(FollowGroupSet)
-
Parameter
-
FollowGroupSet:
-
Type AI_FORMATION.MODE
AI_FORMATION.Mode class
Field(s)
- #number AI_FORMATION.MODE.FOLLOW
- #number AI_FORMATION.MODE.MISSION
Type Distance
Type MENUPARAM
MENUPARAM type
Field(s)
- #function MENUPARAM.ParamFunction
- #string MENUPARAM.ParamMessage