Difference between revisions of "MIST getGroupData"

From DCS World Wiki - Hoggitworld.com
 
 
Line 5: Line 5:
 
|vNum = Mist 3.0
 
|vNum = Mist 3.0
  
|desc= Returns a table in the format required to spawn the group. This function searches mist.DBs.groupsByName for the specified groupName.
+
|desc= Returns a table in the format required to spawn the group. This function searches mist.DBs.groupsByName for the specified groupName. If optional route value is passed the function will also run [[MIST getGroupRoute|mist.getGroupRoute]] on the passed group and add the data to the route entry within the returned table.  
  
 
|rtnType= table
 
|rtnType= table
Line 15: Line 15:
 
|reqType2=  
 
|reqType2=  
  
|optType1=  
+
|optType1= boolean
 +
|optName1= route
 +
 
 +
|optType2=
  
 
|varExamples= group = 'myGroup'  
 
|varExamples= group = 'myGroup'  
Line 23: Line 26:
 
|example= Respawns a group (manually) every 60 minutes.
 
|example= Respawns a group (manually) every 60 minutes.
  
<code>
 
do
 
  local teleGroup = mist.getGroupData('myGroup')
 
  mist.scheduleFunction(mist.dynAdd, {teleGroup}, timer.getTime() + 10, 3600)
 
end
 
</code>
 
  
|notes=  
+
    do
 +
      local teleGroup = mist.getGroupData('myGroup')
 +
      mist.scheduleFunction(mist.dynAdd, {teleGroup}, timer.getTime() + 10, 3600)
 +
    end
 +
 
 +
 
 +
|notes= Mist 4.5.99 added the optional variable.
  
 
|funcs= {{listOfMistGroupData}}
 
|funcs= {{listOfMistGroupData}}

Latest revision as of 22:53, 7 July 2021


mist.getGroupData

Added with: Mist 3.0
Description
Returns a table in the format required to spawn the group. This function searches mist.DBs.groupsByName for the specified groupName. If optional route value is passed the function will also run mist.getGroupRoute on the passed group and add the data to the route entry within the returned table.
Syntax
table mist.getGroupData(string groupName , boolean route )
Valid Input Values:
group = 'myGroup'
Return value:
table
Return example:
TBA
Usage Examples:
Respawns a group (manually) every 60 minutes.


   do
     local teleGroup = mist.getGroupData('myGroup')
     mist.scheduleFunction(mist.dynAdd, {teleGroup}, timer.getTime() + 10, 3600)
   end
Notes:
Mist 4.5.99 added the optional variable.
Related Functions
getGroupData, getCurrentGroupData, getGroupTable getGroupPoints, getGroupRoute, getLeadPos, getAvgPos, getPayload, getGroupPayload, randomizeGroupOrder, groupIsDead

Scripting Engine

MIST Root Page