Module MissileTrainer
Provides missile training functions.
#MISSILETRAINER class
The #MISSILETRAINER class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, the class will destroy the missile within a certain range, to avoid damage to your aircraft. It suports the following functionality:
- Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
- Provide alerts of missile launches, including detailed information of the units launching, including bearing, range …
- Provide alerts when a missile would have killed your aircraft.
- Provide alerts when the missile self destructs.
- Enable / Disable and Configure the Missile Trainer using the various menu options.
MISSILETRAINER construction methods:
Create a new MISSILETRAINER object with the MISSILETRAINER.New method:
- MISSILETRAINER.New: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.
MISSILETRAINER initialization methods:
A MISSILETRAINER object will behave differently based on the usage of initialization methods:
- MISSILETRAINER.InitMessagesOnOff: Sets by default the display of any message to be ON or OFF.
- MISSILETRAINER.InitTrackingToAll: Sets by default the missile tracking report for all players or only for those missiles targetted to you.
- MISSILETRAINER.InitTrackingOnOff: Sets by default the display of missile tracking report to be ON or OFF.
- MISSILETRAINER.InitAlertsToAll: Sets by default the display of alerts to be shown to all players or only to you.
- MISSILETRAINER.InitAlertsHitsOnOff: Sets by default the display of hit alerts ON or OFF.
- MISSILETRAINER.InitAlertsLaunchesOnOff: Sets by default the display of launch alerts ON or OFF.
- MISSILETRAINER.InitRangeOnOff: Sets by default the display of range information of missiles ON of OFF.
- MISSILETRAINER.InitBearingOnOff: Sets by default the display of bearing information of missiles ON of OFF.
Global(s)
| MISSILETRAINER |
Type MISSILETRAINER
Global(s)
Type MissileTrainer
Type MISSILETRAINER
The MISSILETRAINER class
Field(s)
- #string MISSILETRAINER.ClassName
- MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff)
-
Sets by default the display of hit alerts ON or OFF.
Parameter
-
#boolean AlertsHitsOnOff: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff)
-
Sets by default the display of launch alerts ON or OFF.
Parameter
-
#boolean AlertsLaunchesOnOff: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitAlertsToAll(AlertsToAll)
-
Sets by default the display of alerts to be shown to all players or only to you.
Parameter
-
#boolean AlertsToAll: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff)
-
Sets by default the display of bearing information of missiles ON of OFF.
Parameter
-
#boolean DetailsBearingOnOff: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitMessagesOnOff(MessagesOnOff)
-
Sets by default the display of any message to be ON or OFF.
Parameter
-
#boolean MessagesOnOff: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff)
-
Sets by default the display of range information of missiles ON of OFF.
Parameter
-
#boolean DetailsRangeOnOff: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitTrackingOnOff(TrackingOnOff)
-
Sets by default the display of missile tracking report to be ON or OFF.
Parameter
-
#boolean TrackingOnOff: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER:InitTrackingToAll(TrackingToAll)
-
Sets by default the missile tracking report for all players or only for those missiles targetted to you.
Parameter
-
#boolean TrackingToAll: true or false
Return value
#MISSILETRAINER: self
-
- MISSILETRAINER.New(#, Distance, self)
-
Creates the main object which is handling missile tracking.
When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.
Parameters
-
#: ISSILETRAINER -
#number Distance: The distance in meters when a tracked missile needs to be destroyed when close to a player. -
self:
Return value
-
- MISSILETRAINER:_AddBearing(Client, TrainerWeapon)
-
Parameters
-
Client: -
TrainerWeapon:
-
- MISSILETRAINER:_AddRange(Client, TrainerWeapon)
-
Parameters
-
Client: -
TrainerWeapon:
-
- MISSILETRAINER:_EventShot(Event)
-
Detects if an SA site was shot with an anti radiation missile.
In this case, take evasive actions based on the skill level set within the ME.
Parameter
-
Event#EVENTDATA Event:
-
- MISSILETRAINER._MenuMessages(MenuParameters)
-
Parameter
-
MenuParameters:
-