<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.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.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=DCS_task_controlledTask"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=DCS_task_controlledTask&amp;action=history"/>
		<updated>2026-04-24T21:41:02Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.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.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 class=&quot;diff diff-contentalign-left&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 style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; 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='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; 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='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;mission&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 class=&quot;diffchange diffchange-inline&quot;&gt;ControlledTask&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	<entry>
		<id>https://wiki.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.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 = 'ControlledTask', &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;
'''Required parameters''': &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;
'''Optional Parameters''':&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'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;
'''Start Condition Only:'''&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;
'''Stop Condition Only'''&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 = 'Orbit', &lt;br /&gt;
          params = { &lt;br /&gt;
            pattern = 'Circle',&lt;br /&gt;
            point = mist.utils.makeVec2(mist.getAvgPos(mist.makeUnitTable({'[g]arty'}))),&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('Reaper'):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>