Difference between revisions of "DCS task engageTargets"
From DCS World Wiki - Hoggitworld.com
(One intermediate revision by the same user not shown) | |||
Line 24: | Line 24: | ||
params = { | params = { | ||
maxDist = Distance, | maxDist = Distance, | ||
+ | maxDistEnabled = boolean, -- required to check maxDist | ||
targetTypes = array of AttributeName, | targetTypes = array of AttributeName, | ||
priority = number | priority = number | ||
Line 37: | Line 38: | ||
maxDist: Defines the maximum distant in meters the group will deviate from their route to engage a target. | maxDist: Defines the maximum distant in meters the group will deviate from their route to engage a target. | ||
+ | |||
+ | maxDistEnabled : boolean, required to be true if maxDist value is to be used. | ||
priority: The priority of the tasking, the lower the number the more important the objective is. Helps define the order in which AI will execute tasking. By default the value is 0. | priority: The priority of the tasking, the lower the number the more important the objective is. Helps define the order in which AI will execute tasking. By default the value is 0. | ||
|enum= N/A | |enum= N/A | ||
− | |exam= | + | |exam= The following task will allow an AI aircraft to attack radar sites and enemy fighters. |
+ | |||
+ | local gpCon = Group.getByName("M-M-M-M-MultiRole"):getController() | ||
+ | local seadAndFighters = { | ||
+ | id = "EngageTargets", | ||
+ | params = { | ||
+ | targetTypes = {"Fighters", "SAM SR", "SAM TR"}, | ||
+ | priority = 1, | ||
+ | }, | ||
+ | } | ||
+ | gpCon:pushTask(seadAndFighters) | ||
+ | |||
+ | |||
+ | |||
|notes= | |notes= |
Latest revision as of 22:22, 18 March 2024