Difference between revisions of "MIST dynAddStatic"
(Created page with "{{Mission Scripting |fName= mist.dynAddStatic |vNum = Mist 3.3 |desc=With valid data, this function will dynamically spawn a static object as defined by the passed vars to...") |
(No difference)
|
Latest revision as of 06:36, 12 April 2018
mist.dynAddStatic
Added with: Mist 3.3 |
Description |
With valid data, this function will dynamically spawn a static object as defined by the passed vars to categoryName for countryName using the built in scripting function coalition.addStaticObject. |
Syntax |
table mist.dynAddStatic(table vars ) |
Valid Input Values: |
vars tables have the following recognized fields( required entries in blue, optional in green): vars = { type = string type, country = string/number country, category = string/number category, x = number x, y = number y, groupName/name = string groupName/name, groupId = number groupId, clone = boolean clone, dead = boolean dead, heading = number heading, } type is the object type name of the object that is to be spawned country is the country name the group will spawn for category is the category of the static object to spawn x is the x coordinate of the vec2 coordinate defining where this object will spawn y is the y coordinate of the vec2 coordinate defining where this object will spawn groupName/name is an optional variable that defines the group name. If not present the function will generate a new name based on country, category, and groupId. If it is the same as a pre-existing group, this function will overwrite and remove that group existing from the mission. groupId is an optional variable that defines the group Id. If not present the function will generate a new group Id based off of the number of existing groups. If it is the same as a pre-existing groups Id, this function will overwrite and remove that existing group from the mission. clone is an optional variable that defines whether or not it should treat the passed group data as a clone. If present it will create a new group Id and groupName regardless if you passed a custom name or Id. dead is an optional variable defining if the object will be rendered as destroyed once it is spawned heading is the heading the object will be point in. If not present a heading between 0 and 359 degrees will be chosen at random. |
Return value: |
table |
Return example: |
groupDataTable |
Usage Examples: |
local vars = { type = "Airshow_Crowd", country = 'USA', category = "Fortifications", x = -281290.125, y = 646987.4375, name = "Static Crowd", heading = 0.47123889803847, } mist.dynAddStatic(vars) |
Notes: |
Related Functions |
dynAdd, dynAddStatic, groupTableCheck, getNextUnitId, getNextGroupId, respawnGroup, respawnInZone, cloneGroup, cloneInZone, teleportGroup, teleportInZone, teleportToPoint, spawnRandomizedGroup |