Module AIBalancer
This module contains the AIBALANCER class.
1) AIBalancer#AIBALANCER class, extends Base#BASE
The AIBalancer#AIBALANCER class controls the dynamic spawning of AI GROUPS depending on a SETCLIENT. There will be as many AI GROUPS spawned as there at CLIENTS in SETCLIENT not spawned.
1.1) AIBALANCER construction method:
Create a new AIBALANCER object with the AIBALANCER.New method:
- AIBALANCER.New: Creates a new AIBALANCER object.
1.2) AIBALANCER return AI to Airbases:
You can configure to have the AI to return to:
- AIBALANCER.ReturnToHomeAirbase: Returns the AI to the home Airbase#AIRBASE.
- AIBALANCER.ReturnToNearestAirbases: Returns the AI to the nearest friendly Airbase#AIRBASE.
Global(s)
| AIBALANCER |
Type AIBALANCER
| AIBALANCER.ClassName | |
| AIBALANCER:New(SetClient, SpawnAI) |
Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. |
| AIBALANCER.ReturnAirbaseSet | |
| AIBALANCER.ReturnToAirbase | |
| AIBALANCER.ReturnToHomeAirbase | |
| AIBALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) |
Returns the AI to the nearest friendly Airbase#AIRBASE. |
| AIBALANCER.ReturnTresholdRange | |
| AIBALANCER.SetClient | |
| AIBALANCER.SpawnAI | |
| AIBALANCER:_ClientAliveMonitorScheduler() |
Global(s)
Type AIBalancer
Type AIBALANCER
AIBALANCER class
Field(s)
- #string AIBALANCER.ClassName
- AIBALANCER:New(SetClient, SpawnAI)
-
Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.
Parameters
-
SetClient: A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player). -
SpawnAI: A SPAWN object that will spawn the AI units required, balancing the SetClient.
Return value
#AIBALANCER: self
-
- #boolean AIBALANCER.ReturnToAirbase
- #boolean AIBALANCER.ReturnToHomeAirbase
- AIBALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet)
-
Returns the AI to the nearest friendly Airbase#AIRBASE.
Parameters
-
DCSTypes#Distance ReturnTresholdRange: If there is an enemy Client#CLIENT within the ReturnTresholdRange given in meters, the AI will not return to the nearest Airbase#AIRBASE. -
Set#SET_AIRBASE ReturnAirbaseSet: The SET of Set#SET_AIRBASEs to evaluate where to return to.
-