Module AI.AI_Cargo_Helicopter
AI - Models the intelligent transportation of cargo using helicopters.
Author: FlightControl
Global(s)
Global AI_CARGO_HELICOPTER |
Brings a dynamic cargo handling capability for an AI helicopter group. |
Brings a dynamic cargo handling capability for an AI helicopter group.
Helicopter carriers can be mobilized to intelligently transport infantry and other cargo within the simulation.
The AI_CARGO_HELICOPTER class uses the Cargo.Cargo capabilities within the MOOSE framework. Cargo.Cargo must be declared within the mission to make the AI_CARGO_HELICOPTER object recognize the cargo. Please consult the Cargo.Cargo module for more information.
Cargo pickup.
Using the AI_CARGO_HELICOPTER.Pickup() method, you are able to direct the helicopters towards a point on the battlefield to board/load the cargo at the specific coordinate. Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash!
Cargo deployment.
Using the AI_CARGO_HELICOPTER.Deploy() method, you are able to direct the helicopters towards a point on the battlefield to unboard/unload the cargo at the specific coordinate. Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash!
Infantry health.
When infantry is unboarded from the helicopters, the infantry is actually respawned into the battlefield. As a result, the unboarding infantry is very healthy every time it unboards. This is due to the limitation of the DCS simulator, which is not able to specify the health of new spawned units as a parameter. However, infantry that was destroyed when unboarded, won't be respawned again. Destroyed is destroyed. As a result, there is some additional strength that is gained when an unboarding action happens, but in terms of simulation balance this has marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every time is not so much of an issue ...
Developer Note
Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated
Global AI_CARGO_QUEUE |
Type(s)
Field(s)
meter
kph
Function(s)
Deploy Trigger for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Core.Point#COORDINATE Coordinate
Place at which the cargo is deployed.
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
Home Trigger for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Core.Point#COORDINATE Coordinate
Place to which the helicopter will go.
#number Speed
(optional) Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
#number Height
(optional) Height the Helicopter should be flying at.
Creates a new AI_CARGO_HELICOPTER object.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP Helicopter
Core.Set#SET_CARGO CargoSet
Return value:
Deploy Handler OnAfter for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#string From
#string Event
#string To
Core.Point#COORDINATE Coordinate
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
Deployed Handler OnAfter for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#string From
#string Event
#string To
PickedUp Handler OnAfter for AI_CARGO_HELICOPTER - Cargo set has been picked up, ready to deploy
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP Helicopter
The helicopter #GROUP object
#string From
#string Event
#string To
Wrapper.Unit#UNIT Unit
The helicopter #UNIT object
Pickup Handler OnAfter for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#string From
#string Event
#string To
Core.Point#COORDINATE Coordinate
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
Unloaded Handler OnAfter for AI_CARGO_HELICOPTER - Cargo unloaded, carrier is empty
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#string From
#string Event
#string To
The #CARGO_GROUP object.
Wrapper.Unit#UNIT Unit
The helicopter #UNIT object
Deploy Handler OnBefore for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#string From
#string Event
#string To
Core.Point#COORDINATE Coordinate
Place at which cargo is deployed.
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
Return value:
#boolean:
Pickup Handler OnBefore for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#string From
#string Event
#string To
Core.Point#COORDINATE Coordinate
Return value:
#boolean:
Pickup Trigger for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Core.Point#COORDINATE Coordinate
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
Set the Carrier.
Set landingspeed and -height for helicopter landings.
Adjust after tracing if your helis get stuck after landing.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#number speed
Landing speed in kph(!), e.g. 15
#number height
Landing height in meters(!), e.g. 5.5
Return value:
self
Usage:
If your choppers get stuck, add tracing to your script to determine if they hit the right parameters like so:
BASE:TraceOn()
BASE:TraceClass("AI_CARGO_HELICOPTER")
Watch the DCS.log for entries stating `Helicopter:<name>, Height = Helicopter:<number>, Velocity = Helicopter:<number>`
Adjust if necessary.
Depoloy function and queue.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP AICargoHelicopter
Core.Point#COORDINATE Coordinate
Coordinate
DeployZone
Deploy Asynchronous Trigger for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#number Delay
Delay in seconds.
#AI_CARGO_HELICOPTER self
Core.Point#COORDINATE Coordinate
Place at which the cargo is deployed.
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
Home Asynchronous Trigger for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#number Delay
Delay in seconds.
#AI_CARGO_HELICOPTER self
Core.Point#COORDINATE Coordinate
Place to which the helicopter will go.
#number Speed
(optional) Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
#number Height
(optional) Height the Helicopter should be flying at.
Pickup Asynchronous Trigger for AI_CARGO_HELICOPTER
Defined in:
AI_CARGO_HELICOPTER
Parameters:
#number Delay
Delay in seconds.
Core.Point#COORDINATE Coordinate
#number Speed
Speed in km/h to go to the pickup coordinate. Default is 50% of max possible speed the unit can go.
On after Deploy event.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP Helicopter
Transport helicopter.
From
Event
To
Core.Point#COORDINATE Coordinate
Place at which the cargo is deployed.
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
#number Height
Height in meters to move to the deploy coordinate.
DeployZone
On after Deployed event.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP Helicopter
#string From
From state.
#string Event
Event.
#string To
To state.
Cargo.Cargo#CARGO Cargo
Cargo object.
#boolean Deployed
Cargo is deployed.
DeployZone
Return value:
#boolean:
True if all cargo has been unloaded.
On after Home event.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP Helicopter
From
Event
To
Core.Point#COORDINATE Coordinate
Home place.
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
#number Height
Height in meters to move to the home coordinate.
Core.Zone#ZONE HomeZone
The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.
@param #AI_CARGO_HELICOPTER self @param Wrapper.Group#GROUP Helicopter @param From @param Event @param To
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Helicopter
From
Event
To
@param #AI_CARGO_HELICOPTER self @param Wrapper.Group#GROUP Helicopter @param From @param Event @param To @param Core.Point#COORDINATE Coordinate @param #number Speed
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Helicopter
From
Event
To
Coordinate
On after Pickup event.
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Wrapper.Group#GROUP Helicopter
From
Event
To
Core.Point#COORDINATE Coordinate
Pickup place.
#number Speed
Speed in km/h to fly to the pickup coordinate. Default is 50% of max possible speed the unit can go.
#number Height
Height in meters to move to the pickup coordinate. This parameter is ignored for APCs.
Core.Zone#ZONE PickupZone
(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.
@param #AI_CARGO_HELICOPTER self @param Wrapper.Group#GROUP Helicopter @param From @param Event @param To @param Core.Point#COORDINATE Coordinate @param #number Speed
Defined in:
AI_CARGO_HELICOPTER
Parameters:
Helicopter
From
Event
To
Coordinate
Speed
DeployZone