Jump to content

Recommended Posts

Posted

Trying to spawn in 2 bofor guns at St. Croix in the Normandy map using MIST.  Here's what I have so far.  Nothing spawns in.  Any help would be SUPER appreciated!!  

{
    -- GROUP 1: Air_Defense_St_Croix
    [1] = 
    {
        ["country"] = "UK",
        ["coalitionId"] = 2,
        ["hidden"] = false,
        ["units"] = 
        {
            -- UNIT 1
            [1] = 
            {
                ["alt"] = 160,
                ["point"] =
                {
                    ["y"] = -15135,
                    ["x"] = -18859,
                }, 
                --end of ["point"]
                ["coalitionId"] = 2,
                ["skill"] = "Excellent",
                ["category"] = "vehicle",
                ["speed"] = 0,
                ["type"] = "bofors40",
                ["groupId"] = 1,
                ["groupName"] = "Air_Defense_St_Croix",
                ["countryId"] = 4,
                ["y"] = -15135,
                ["x"] = -18859,
                ["heading"] = 0,
                ["country"] = "UK",
                ["unitName"] = "Air_Defense_St_Croix",
                ["unitId"] = 1,
                ["coalition"] = "blue",
            }, 
            -- end of UNIT [1]

            -- UNIT 2
            [2] = 
            {
                ["alt"] = 160,
                ["point"] =
                {
                    ["y"] = -15130,
                    ["x"] = -18729,
                }, 
                --end of ["point"]
                ["coalitionId"] = 2,
                ["skill"] = "Excellent",
                ["category"] = "vehicle",
                ["speed"] = 0,
                ["type"] = "bofors40",
                ["groupId"] = 1,
                ["groupName"] = "Air_Defense_St_Croix",
                ["countryId"] = 4,
                ["y"] = -15560,
                ["x"] = -18850,
                ["heading"] = 0,
                ["country"] = "UK",
                ["unitName"] = "Air_Defense_St_Croix-1",
                ["unitId"] = 2,
                ["coalition"] = "blue",
            }, 
            -- end of UNIT [2]
        }, 
        -- end of ["units"]
        
        ["countryId"] = 4,
        ["coalition"] = "blue",
        ["timeAdded"] = 0,
        ["category"] = "vehicle",
        ["country"] = "UK",
        ["startTime"] = 0,        
        ["name"] = "Air_Defense_St_Croix",
        ["uncontrolled"] = false,
        ["groupId"] = 1,
        ["groupName"] = "Air_Defense_St_Croix", 
        
    }, 
    -- end of GROUP [1]: Air_Defense_St_Croix

-- end of dynGroupsAdded

mist.dynAdd(dynGroupsAdded)

"Never in the field of human conflict was so much owed by so many to so few." Winston Churchill

 

SYSTEM:

Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled

Installed memory (RAM) - 32.0 GB

64-bit Operating System, x64-based processor

Windows 10 & DCS on SSD

Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti

Internet: Cable 200Mbps 12Mbps

Posted

Anyone?

"Never in the field of human conflict was so much owed by so many to so few." Winston Churchill

 

SYSTEM:

Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled

Installed memory (RAM) - 32.0 GB

64-bit Operating System, x64-based processor

Windows 10 & DCS on SSD

Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti

Internet: Cable 200Mbps 12Mbps

Posted (edited)
18 hours ago, ChuckIV said:

Trying to spawn in 2 bofor guns at St. Croix in the Normandy map using MIST.  Here's what I have so far.  Nothing spawns in.  Any help would be SUPER appreciated!!  

{
    -- GROUP 1: Air_Defense_St_Croix
    [1] = 
    {
        ["country"] = "UK",
        ["coalitionId"] = 2,
        ["hidden"] = false,
        ["units"] = 
        {
            -- UNIT 1
            [1] = 
            {
                ["alt"] = 160,
                ["point"] =
                {
                    ["y"] = -15135,
                    ["x"] = -18859,
                }, 
                --end of ["point"]
                ["coalitionId"] = 2,
                ["skill"] = "Excellent",
                ["category"] = "vehicle",
                ["speed"] = 0,
                ["type"] = "bofors40",
                ["groupId"] = 1,
                ["groupName"] = "Air_Defense_St_Croix",
                ["countryId"] = 4,
                ["y"] = -15135,
                ["x"] = -18859,
                ["heading"] = 0,
                ["country"] = "UK",
                ["unitName"] = "Air_Defense_St_Croix",
                ["unitId"] = 1,
                ["coalition"] = "blue",
            }, 
            -- end of UNIT [1]

            -- UNIT 2
            [2] = 
            {
                ["alt"] = 160,
                ["point"] =
                {
                    ["y"] = -15130,
                    ["x"] = -18729,
                }, 
                --end of ["point"]
                ["coalitionId"] = 2,
                ["skill"] = "Excellent",
                ["category"] = "vehicle",
                ["speed"] = 0,
                ["type"] = "bofors40",
                ["groupId"] = 1,
                ["groupName"] = "Air_Defense_St_Croix",
                ["countryId"] = 4,
                ["y"] = -15560,
                ["x"] = -18850,
                ["heading"] = 0,
                ["country"] = "UK",
                ["unitName"] = "Air_Defense_St_Croix-1",
                ["unitId"] = 2,
                ["coalition"] = "blue",
            }, 
            -- end of UNIT [2]
        }, 
        -- end of ["units"]
        
        ["countryId"] = 4,
        ["coalition"] = "blue",
        ["timeAdded"] = 0,
        ["category"] = "vehicle",
        ["country"] = "UK",
        ["startTime"] = 0,        
        ["name"] = "Air_Defense_St_Croix",
        ["uncontrolled"] = false,
        ["groupId"] = 1,
        ["groupName"] = "Air_Defense_St_Croix", 
        
    }, 
    -- end of GROUP [1]: Air_Defense_St_Croix

-- end of dynGroupsAdded

mist.dynAdd(dynGroupsAdded)

not sure where you found many of the values in this table.. never seen them in a ground unit table... i would suggest you use this one and edit it:

Also i would not define Groupid and unitid... it will overwrite the existing group with that id..

https://wiki.hoggitworld.com/view/DCS_exam_group_ground

 

 

Edited by Kanelbolle
Posted

Can this table be called St_Croix_Defense instead of groundExam ? Also, can I use this table in dynGroupsAdded like this mist.dynAdd(St_Croix_Defense)   ?  I appreciate your help!

ChuckIV

"Never in the field of human conflict was so much owed by so many to so few." Winston Churchill

 

SYSTEM:

Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled

Installed memory (RAM) - 32.0 GB

64-bit Operating System, x64-based processor

Windows 10 & DCS on SSD

Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti

Internet: Cable 200Mbps 12Mbps

Posted
22 hours ago, ChuckIV said:

Can this table be called St_Croix_Defense instead of groundExam ? Also, can I use this table in dynGroupsAdded like this mist.dynAdd(St_Croix_Defense)   ?  I appreciate your help!

ChuckIV

The table name doesn't matter what it is called as long at it is a valid name.

Have not used mist in a long time to spawn anything, but here is 1 way of using the mist.dynAdd function to spawn at trigger zone and offsetting the units position to not spawn on top of each other.

See mission file and/or code:

local zone = trigger.misc.getZone('TriggerZone-1')
-- you can also get a random spot in the zone for each unit using mist.getRandomPointInZone
-- https://wiki.hoggitworld.com/view/MIST_getRandomPointInZone
St_Croix_Defense = 
{
	["visible"] = true,
	["taskSelected"] = true,
	["route"] = 
	{
		["points"] = 
		{
			[1] = 
			{
				["alt"] = 12,
				["type"] = "Turning Point",
				["action"] = "Off Road",
				["alt_type"] = "BARO",
				["form"] = "Off Road",
				["y"] = zone.point.z,
				["x"] = zone.point.x,
				["speed"] = 5.5555555555556,
				["task"] = 
				{
					["id"] = "ComboTask",
					["params"] = 
					{
						["tasks"] = 
						{
							[1] = 
							{
								["enabled"] = true,
								["auto"] = true,
								["id"] = "WrappedAction",
								["number"] = 1,
								["params"] = 
								{
									["action"] = 
									{
										["id"] = "EPLRS",
										["params"] = 
										{
											["value"] = true,
											["groupId"] = 1,
										}, -- end of ["params"]
									}, -- end of ["action"]
								}, -- end of ["params"]
							}, -- end of [1]
							[2] = 
							{
								["enabled"] = true,
								["auto"] = false,
								["id"] = "FireAtPoint",
								["number"] = 2,
								["params"] = 
								{
									["y"] = zone.point.z+500,
									["x"] = zone.point.x+500,
									["templateId"] = "",
									["expendQtyEnabled"] = true,
									["alt_type"] = 1,
									["expendQty"] = 20,
									["weaponType"] = 1073741822,
									["zoneRadius"] = 0,
								}, -- end of ["params"]
							}, -- end of [2]
						}, -- end of ["tasks"]
					}, -- end of ["params"]
				}, -- end of ["task"]
			}, -- end of [1]
		}, -- end of ["points"]
	}, -- end of ["route"]
	
	-- ["groupId"] = 2, -- Commented out to avoid overwriting group id of existing groups
	["tasks"] = 
	{
	}, -- end of ["tasks"]
	["hidden"] = false,
	["units"] = 
	{
		[1] = 
		{
			["type"] = "SAU 2-C9",
			["transportable"] = 
			{
				["randomTransportable"] = false,
			}, -- end of ["transportable"]
			-- ["unitId"] = 9, -- Commented out to avoid overwriting group id of existing units
			["skill"] = "High",
			["y"] = zone.point.z-20,
			["x"] = zone.point.x-20,
			["name"] = "Ground-1-4",
			["playerCanDrive"] = true,
			["heading"] = 0,
		}, -- end of [1]
		[2] = 
		{
			["type"] = "SAU 2-C9",
			["transportable"] = 
			{
				["randomTransportable"] = false,
			}, -- end of ["transportable"]
			-- ["unitId"] = 8, -- Commented out to avoid overwriting group id of existing units
			["skill"] = "High",
			["y"] = zone.point.z-40,
			["x"] = zone.point.x-40,
			["name"] = "Ground-1-3",
			["playerCanDrive"] = true,
			["heading"] = 0,
		}, -- end of [2]
		[4] = 
		{
			["type"] = "SAU 2-C9",
			["transportable"] = 
			{
				["randomTransportable"] = false,
			}, -- end of ["transportable"] 
			-- ["unitId"] = 6, -- Commented out to avoid overwriting group id of existing units
			["skill"] = "High",
			["y"] = zone.point.z-60,
			["x"] = zone.point.x-60,
			["name"] = "Ground-1-1",
			["playerCanDrive"] = true,
			["heading"] = 0,
		}, -- end of [4]
		[3] = 
		{
			["type"] = "SAU 2-C9",
			["transportable"] = 
			{
				["randomTransportable"] = false,
			}, -- end of ["transportable"]
			-- ["unitId"] = 7, -- Commented out to avoid overwriting group id of existing units
			["skill"] = "High",
			["y"] = zone.point.z-80,
			["x"] = zone.point.x-80,
			["name"] = "Ground-1-2",
			["playerCanDrive"] = true,
			["heading"] = 0,
		}, -- end of [3]
	}, -- end of ["units"]
	["y"] = zone.point.z,
	["x"] = zone.point.x,
	["uncontrollable"] = false,
	["name"] = "Ground-1",
	["start_time"] = 0,
	["task"] = "Ground Nothing",
} -- end of groundExam

St_Croix_Defense.country = 'Russia'
St_Croix_Defense.category = Group.Category.GROUND
-- If you want to assign group id's
-- St_Croix_Defense.groupId = mist.getNextGroupId()
-- St_Croix_Defense.units[1].unitId = mist.getNextUnitId()
-- St_Croix_Defense.units[2].unitId = mist.getNextUnitId()
-- St_Croix_Defense.units[3].unitId = mist.getNextUnitId()
-- St_Croix_Defense.units[4].unitId = mist.getNextUnitId()
mist.dynAdd(St_Croix_Defense)

trigger.action.outText("Spawned group " .. St_Croix_Defense.name , 10)

 

 

Mist_dynAdd_test1.miz

Posted

This is great! Thank you - I’ll give this a go! ChuckIV 

"Never in the field of human conflict was so much owed by so many to so few." Winston Churchill

 

SYSTEM:

Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled

Installed memory (RAM) - 32.0 GB

64-bit Operating System, x64-based processor

Windows 10 & DCS on SSD

Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti

Internet: Cable 200Mbps 12Mbps

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...