Difference between revisions of "DCS task follow"
From DCS World Wiki - Hoggitworld.com
m (1 revision imported) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
--Need to add more details on the xyz coords so people better understand the positioning. | --Need to add more details on the xyz coords so people better understand the positioning. | ||
− | '''Optional Parameters''': | + | '''Optional Parameters''': |
− | lastWptIndexFlag : if true the AI will follow the group until it reaches a specified waypoint. | + | lastWptIndexFlag : ('''Default: True''') if true the AI will follow the group until it reaches a specified waypoint. |
− | lastWptIndex : Identifies the waypoint at which the following group will stop its task. | + | lastWptIndex : '''(Default: -1)''' Identifies the waypoint at which the following group will stop its task. Must be set if lastWPIndexFlag is not changed to false. Otherwise the AI will immediately abandon the task. |
+ | |||
+ | |||
|enum= N/A | |enum= N/A | ||
− | |exam= | + | |exam= This example will have the group named "follower" follow the group with an groupId of 5 offset 200 meters to the right and 100 meters behind. |
+ | local followTask = { | ||
+ | id = 'Follow', | ||
+ | params = { | ||
+ | groupId = 5, | ||
+ | pos = {x = 200, y = 0, z = -100, | ||
+ | lastWptIndexFlag = false, | ||
+ | } | ||
+ | } | ||
+ | Group.getByName('follower'):getController():pushTask(followTask) | ||
|notes= See article [[Mission Editor: AI Tasking]] for more information on how AI tasking is handled within DCS. | |notes= See article [[Mission Editor: AI Tasking]] for more information on how AI tasking is handled within DCS. |
Latest revision as of 00:21, 28 September 2021