Module AI_Cargo_Dispatcher_APC

AI -- (R2.4) - Models the intelligent transportation of infantry and other cargo using APCs.


Author: FlightControl


Global(s)

AI_CARGO_DISPATCHER_APC

AI_CARGO_DISPATCHER_APC class, extends Core.Base#BASE

Banner Image


AI_CARGO_DISPATCHER_APC brings a dynamic cargo handling capability for AI groups.

Type AI_CARGO_DISPATCHER_APC

AI_CARGO_DISPATCHER_APC:AICargo(APC, SetCargo)
AI_CARGO_DISPATCHER_APC.CombatRadius
AI_CARGO_DISPATCHER_APC:New(SetAPC, SetCargo, SetDeployZone, CombatRadius, SetDeployZones)

Creates a new AICARGODISPATCHER_APC object.

Global(s)

#AI_CARGO_DISPATCHER_APC AI_CARGO_DISPATCHER_APC

AI_CARGO_DISPATCHER_APC class, extends Core.Base#BASE

Banner Image


AI_CARGO_DISPATCHER_APC brings a dynamic cargo handling capability for AI groups.

Armoured Personnel APCs (APC), Trucks, Jeeps and other carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation. The AI_CARGO_DISPATCHER_APC module uses the Cargo capabilities within the MOOSE framework. CARGO derived objects must be declared within the mission to make the AI_CARGO_DISPATCHER_APC object recognize the cargo. Please consult the Cargo module for more information.

1. AI_CARGO_DISPATCHER_APC constructor

2. AI_CARGO_DISPATCHER_APC is a FSM

Process

2.1. AI_CARGO_DISPATCHER_APC States

  • Monitoring: The process is dispatching.
  • Idle: The process is idle.

2.2. AI_CARGO_DISPATCHER_APC Events

  • Monitor: Monitor and take action.
  • Start: Start the transport process.
  • Stop: Stop the transport process.
  • Pickup: Pickup cargo.
  • Load: Load the cargo.
  • Loaded: Flag that the cargo is loaded.
  • Deploy: Deploy cargo to a location.
  • Unload: Unload the cargo.
  • Unloaded: Flag that the cargo is unloaded.
  • Home: A APC is going home.

3. Set the pickup parameters.

Several parameters can be set to pickup cargo:

  • #AI_CARGO_DISPATCHER(): Sets or randomizes the pickup location for the APC around the cargo coordinate in a radius defined an outer and optional inner radius.
  • #AI_CARGO_DISPATCHER(): Set the speed or randomizes the speed in km/h to pickup the cargo.

4. Set the deploy parameters.

Several parameters can be set to deploy cargo:

  • #AI_CARGO_DISPATCHER(): Sets or randomizes the deploy location for the APC around the cargo coordinate in a radius defined an outer and an optional inner radius.
  • #AI_CARGO_DISPATCHER(): Set the speed or randomizes the speed in km/h to deploy the cargo.

5. Set the home zone when there isn't any more cargo to pickup.

A home zone can be specified to where the APCs will move when there isn't any cargo left for pickup. Use #AI_CARGO_DISPATCHER() to specify the home zone.

If no home zone is specified, the APCs will wait near the deploy zone for a new pickup command.


Type AI_Cargo_Dispatcher_APC

Type AI_CARGO_DISPATCHER_APC

Extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER

Field(s)

AI_CARGO_DISPATCHER_APC:AICargo(APC, SetCargo)

Parameters

  • APC :

  • SetCargo :

AI_CARGO_DISPATCHER_APC.CombatRadius
AI_CARGO_DISPATCHER_APC:New(SetAPC, SetCargo, SetDeployZone, CombatRadius, SetDeployZones)

Creates a new AICARGODISPATCHER_APC object.

Parameters

  • Core.Set#SET_GROUP SetAPC : The collection of APC Groups.

  • Core.Set#SET_CARGO SetCargo : The collection of Cargo derived objects.

  • Core.Set#SET_ZONE SetDeployZone : The collection of deploy Zones, which are used to where the cargo will be deployed by the APCs.

  • #number CombatRadius : The cargo will be unloaded from the APC and engage the enemy if the enemy is within CombatRadius range. The radius is in meters, the default value is 500 meters.

  • SetDeployZones :

Return value

#AI_CARGO_DISPATCHER_APC:

Usage:


-- Create a new cargo dispatcher for the set of APCs, with a combatradius of 500.
SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart()
SetCargo = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart()
SetDeployZone = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart()
AICargoDispatcher = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargo, SetDeployZone, 500 )