<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-new.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=DCS_task_controlledTask</id>
	<title>DCS task controlledTask - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-new.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=DCS_task_controlledTask"/>
	<link rel="alternate" type="text/html" href="https://wiki-new.hoggitworld.com/index.php?title=DCS_task_controlledTask&amp;action=history"/>
	<updated>2026-10-23T11:28:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki-new.hoggitworld.com/index.php?title=DCS_task_controlledTask&amp;diff=14574&amp;oldid=prev</id>
		<title>Grimes at 02:05, 21 September 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki-new.hoggitworld.com/index.php?title=DCS_task_controlledTask&amp;diff=14574&amp;oldid=prev"/>
		<updated>2023-09-21T02:05:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:05, 21 September 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot;&gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Aircraft Task|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Aircraft Task|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Helicopter Task|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Helicopter Task|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Ground Task|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Ground Task|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Naval Task|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Naval Task|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key hoggitwiki-hoggitwiki-:diff:1.41:old-14571:rev-14574:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Grimes</name></author>
	</entry>
	<entry>
		<id>https://wiki-new.hoggitworld.com/index.php?title=DCS_task_controlledTask&amp;diff=14571&amp;oldid=prev</id>
		<title>Grimes: Created page with &quot;{{Template:DCS_tasking  |tName= ControlledTask  |vNum= 1.1  |type= Main task  |for= Airplanes, Helicopters, Ships, Ground Vehicles  |desc= A controlled task is a task that has...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki-new.hoggitworld.com/index.php?title=DCS_task_controlledTask&amp;diff=14571&amp;oldid=prev"/>
		<updated>2023-09-21T01:04:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Template:DCS_tasking  |tName= ControlledTask  |vNum= 1.1  |type= Main task  |for= Airplanes, Helicopters, Ships, Ground Vehicles  |desc= A controlled task is a task that has...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:DCS_tasking&lt;br /&gt;
&lt;br /&gt;
|tName= ControlledTask&lt;br /&gt;
&lt;br /&gt;
|vNum= 1.1&lt;br /&gt;
&lt;br /&gt;
|type= Main task&lt;br /&gt;
&lt;br /&gt;
|for= Airplanes, Helicopters, Ships, Ground Vehicles&lt;br /&gt;
&lt;br /&gt;
|desc= A controlled task is a task that has start and/or stop conditions that will be used as a condition to start or stop the task. &lt;br /&gt;
&lt;br /&gt;
Start conditions are executed only once when the task is reached in the task queue. If the conditions are not met the task will be skipped. &lt;br /&gt;
&lt;br /&gt;
Stop Conditions are executed at a high rate&lt;br /&gt;
&lt;br /&gt;
Can be used with any task in DCS. Note that options and commands do *NOT* have stopConditions. These tasks are executed immediately and take &amp;quot;no time&amp;quot; to run. &lt;br /&gt;
&lt;br /&gt;
|avail= All&lt;br /&gt;
&lt;br /&gt;
|form=  This task needs to be in the following format. &lt;br /&gt;
&lt;br /&gt;
 ControlledTask= { &lt;br /&gt;
  id = &amp;#039;ControlledTask&amp;#039;, &lt;br /&gt;
  params = { &lt;br /&gt;
      task = {&lt;br /&gt;
         taskToExecute&lt;br /&gt;
      },&lt;br /&gt;
      condition = {&lt;br /&gt;
      },&lt;br /&gt;
      stopCondition = {&lt;br /&gt;
      },&lt;br /&gt;
  } &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Required parameters&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
task : Any task to be executed&lt;br /&gt;
&lt;br /&gt;
condition : Table of start conditions required to exist for the task to execute&lt;br /&gt;
&lt;br /&gt;
stopCondition : Table of stop conditions that will end the task once met. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Optional Parameters&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
time : Time in seconds since mission start. A value of 3600 would be a condition of 1 hour into the mission&lt;br /&gt;
 &lt;br /&gt;
condition : string lua code that is executed. Requires return true for the condition to execute&lt;br /&gt;
   if targetsKilled &amp;gt; 8 then return true end &lt;br /&gt;
&lt;br /&gt;
userFlag : string or number of a user flag. By default checks if the flag is true/ isn&amp;#039;t 0. &lt;br /&gt;
&lt;br /&gt;
userFlagValue : boolean required if you want to check if the flag is false. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Start Condition Only:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
probability : number 0-100 chance of the task executing. Is only checked once. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Stop Condition Only&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
lastWaypoint : number of the last waypoint that if the AI reach it will stop the task&lt;br /&gt;
&lt;br /&gt;
duration : number duration in seconds that the task will run for. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|enum= &lt;br /&gt;
&lt;br /&gt;
|exam= The following will have a 70% chance of executing the task &amp;quot;timedOrbit&amp;quot; which if executed will run for 15 minutes.  &lt;br /&gt;
&lt;br /&gt;
    local timedOrbit = {&lt;br /&gt;
      id = &amp;quot;ControlledTask&amp;quot;,&lt;br /&gt;
      params =  {&lt;br /&gt;
        task = {&lt;br /&gt;
          id = &amp;#039;Orbit&amp;#039;, &lt;br /&gt;
          params = { &lt;br /&gt;
            pattern = &amp;#039;Circle&amp;#039;,&lt;br /&gt;
            point = mist.utils.makeVec2(mist.getAvgPos(mist.makeUnitTable({&amp;#039;[g]arty&amp;#039;}))),&lt;br /&gt;
            speed = 200,&lt;br /&gt;
            altitude = 8000,&lt;br /&gt;
           },&lt;br /&gt;
           condition = {&lt;br /&gt;
             probability = 70,&lt;br /&gt;
           },&lt;br /&gt;
           stopCondition = {&lt;br /&gt;
              duration = 900,&lt;br /&gt;
           }, &lt;br /&gt;
         },&lt;br /&gt;
      }&lt;br /&gt;
      Group.getByName(&amp;#039;Reaper&amp;#039;):getController():pushTask(timedOrbit)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|notes= See article [[Mission Editor: AI Tasking]] for more information on how AI tasking is handled within DCS. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Aircraft Task|mission]]&lt;br /&gt;
[[Category:Helicopter Task|mission]]&lt;br /&gt;
[[Category:Ground Task|mission]]&lt;br /&gt;
[[Category:Naval Task|mission]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>
	</entry>
</feed>