Jump to content

MIssion Scripting Tools (Mist)- enhancing mission scripting Lua


Recommended Posts

Apparently the name of the value used in the function was changed. Not entirely sure when or why that happened. You can fix it yourself or wait for the next release. I've been holding off on an update while waiting for 1.5.7 to get released.

 

Should be;

units[#units + 1] = Unit.getByName(unit_names)

 

was;

units[#units + 1] = Unit.getByName(unitNames)

 

 

Also your target name would need to be a table of names. So local targetname = {'aircraft'}

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

2 things.

 

1. I was saying there is a bug with the function itself, so it will always error out when called because it is always looking for a nil value. It is a simple fix.

 

2. It accepts a table of unitnames. So the targetName you are passing to it needs to be a table. For example targetname = {'unit1', 'unit2', 'unit3'}

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Probably easier to just directly use point in poly at that point. You will be working with unit objects and not a list of units by name, so you can sorta skip a step/make your own slightly modified version of the function as is.

 

local unitsInZone = {}

if mist.pointInPolygon(target:getPosition().p, mist.getGroupPoints(unitzonename), altitude) then

unitsInZone[#unitsInZone+1] = target:getName()

end

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Probably easier to just directly use point in poly at that point. You will be working with unit objects and not a list of units by name, so you can sorta skip a step/make your own slightly modified version of the function as is.

 

local unitsInZone = {}

if mist.pointInPolygon(target:getPosition().p, mist.getGroupPoints(unitzonename), altitude) then

unitsInZone[#unitsInZone+1] = target:getName()

end

 

uhmmm make sense.

 

Thanks!!! I ll try this!

 

(PS: this is for a Chaff corridor script... for my Jamming Script. Factors will be:

 

Target detected by SAM?

Is it in the "corridor"? (polygon zone)

Is higher or lower? how much? (I ll make a function to increase or decrease the probability of detection if you are too high or too low of the "chaff corridor")

What is the distance between Sam and Target detected?? (the closer the less efective of the jamming due to Burnthrough issues)...

And finnally, the corridor will be open for certain time... from 12:00 to 12:10...

 

All the above adds a number which will be the probability of succesfull jamming (0-100). THen a simple dice... math.random(0,100) and voila!!! you will, or you will not be engaged... cool ah??

 

 

So, I think, this can add lot of inmersion... and you MUST have a good navigation skills!!!

 

 

EDIT:

 

great!!! the solution you gave was much much easier!! and works great!! I dont need to put it on a table, just to konw if it is at this time!!

if mist.pointInPolygon(target:getPosition().p, mist.getGroupPoints(unitzonename), altitude) then
trigger.action.outText(targetname.." is inside!!!",1)
end


Edited by ESAc_matador
Link to comment
Share on other sites

  • 2 weeks later...

mist.respawnGroup doesn't work

 

I am trying to figure out how to simply let an AI plane group respawn, after they got shot down. I used this mist.respawnGroup('su25'). And I get this error once it should respawn:

 

 

 

[string

„c\users\pappnase\appdata\local\temp\dcs\/~mis00007D8C“]:4970

: attempt to index local 'newGroupData' (a nil value)

stack traceback

[C]: ?

[string

„c\users\pappnase\appdata\local\temp\dcs\/~mis00007D8C“]:4970

: in function 'teleportToPoint'

[string

„c\users\pappnase\appdata\local\temp\dcs\/~mis00007D8C“]:5080

: in function 'respawnGroup'

[string „ mist.respawnGroup ('su25')...“]:1: in main chunk

 

 

I attached the mission file so you can see what I did. Su25 is the group name.

respawntest.miz

Link to comment
Share on other sites

You are using a rather old version of mist, a version that isn't fully compatible with changes the the mission file format. You can get an up to date version here: https://github.com/mrSkortch/MissionScriptingTools/releases

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

A GCICAP user may have fallen over a post 1.5.7 Mist bug. Not really sure and as mentioned here https://forums.eagle.ru/showpost.php?p=3192919&postcount=1040 along with the snippet of dcs.log I don't have time to investigate for the next few days. However this morning I did notice 1 obvious thing - the logger message re "Spawning fighter group...." and I did a quick string search through the GCICAP lua. The only instance of this logger message immediately precedes a call to mist.dynAdd to create the group in mission. So potentially the 1.5.7 update has caused a problem for this mist function. Whatever the error is caused a memory access violation on DCS.exe.

 

 

 

 

if mist.groupTableCheck(group_data) then

local spawn_pos = airbase:getName()

if spawn_mode == "in-zone" then

spawn_pos = zone

end

gcicap.log:info("Spawning fighter group $1 at $2", name, spawn_pos)

mist.dynAdd(group_data)

else

gcicap.log:error("Couldn't spawn group with following groupTable: $1", group_data)

end

return Group.getByName(name)

end

 

 

Link to comment
Share on other sites

I had a look at this problem tonight with CGICAP + 1.5.7 causing DCS to crash , I added some debug trace messages to MIST mist.DynAdd function

 

here are my findings (I hope this is usefull)

 

Line # 1481

 

coalition.addGroup(country.id[newCountry], Unit.Category[newCat], newGroup)

 

The debug print statment before it worked fine. the one after that statement was never output and DCS World crashed

modified code

 

log:error("Block 11")

 

for unitIndex, unitData in pairs(newGroup.units) do

newGroup.units[unitIndex].unitName = nil

log:error("Block 12")

end

log:error("Block 13")

 

coalition.addGroup(country.id[newCountry], Unit.Category[newCat], newGroup)

log:error("Block 14")

 

 

LOG

 

00115.586 ERROR SCRIPTING: MIST|dynAdd|1503: Block 12

00115.586 WARNING LOG: 1 duplicate message(s) skipped.

00115.586 ERROR SCRIPTING: MIST|dynAdd|1505: Block 13

00115.586 INFO EDCORE: try to write dump information

00115.587 INFO EDCORE: # -------------- 20170719-214807 --------------

00115.587 INFO EDCORE: R:\DCS_World_OpenBeta\bin\DCS.exe

00115.587 INFO EDCORE: # C0000005 ACCESS_VIOLATION at 403DBBF8 00:00000000

00115.590 INFO EDCORE: 00000000 00000000 0000:00000000

 

 

I hope this helps in resolving this issue, thanks

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Thanks Johnny, haven't had time to do what you have done.

 

 

So from your tests it would appear that the DCS coalition.addGroup function has changed somehow and either has a bug or the usage has changed and so doesn't work with the current version of mist.dynAdd

 

 

Hoping Grimes has seen these posts.

Link to comment
Share on other sites

Figuring out crashes related to scripting code like this makes me really miss the old non unified game engine. When the sim exe crashes you just get sent back to the editor exe as if you exited the mission. Now you gotta restart the whole thing. Anyways I figured it out.

 

 

Found the problem, the waypoint was missing the task table. I loaded up an older mission using GCI CAP that was crashing the sim in 1.5.2 or something, so I have no idea how up to date it is. I exported the table mist was using to spawn the group and compared it to a table that was spawning correctly. Process of elimination narrowed it down to this missing from each waypoint table:

 

["task"] = 
{
["id"] = "ComboTask",
["params"] = 
{
	["tasks"] = 
	{
	}, -- end of ["tasks"]
}, -- end of ["params"]
}, -- end of ["task"]

 

Its not something that mist checks for because it wasn't required to spawn the group. Obviously if something is required and missing it should just fail to spawn the group. I don't know if that requirement has changed or not, but it still shouldn't crash the sim.

 

To give a frame of reference this is the points table in its entirety. When the task entry is missing the game will crash. I need to investigate it further with other group types.

["route"] = 
{
	["points"] = 
	{
		[1] = 
		{
			["alt"] = 2000,
			["x"] = -52155.1015625,
			["action"] = "From Parking Area",
			["alt_type"] = "RADIO",
			["speed"] = 138.88888888889,
			["airdromeId"] = 26,
			["type"] = "TakeOffParking",
			["y"] = 707557,
			["task"] = 
			{
				["id"] = "ComboTask",
				["params"] = 
				{
					["tasks"] = 
					{
					}, -- end of ["tasks"]
				}, -- end of ["params"]
			}, -- end of ["task"]
		}, -- end of [1]
	}, -- end of ["points"]
}, -- end of ["route"]

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Hi Grimes, Thanks for taking the time to look at this issue, have you had any success ?

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Hi Grimes, Thanks for taking the time to look at this issue, have you had any success ?

 

I literally stated what the bug was in the previous forum post. The issue was isolated to 1.5.7, as I couldn't reproduce it on the tester version or 2.1. Whenever that is the case it bodes well that it might be fixed in the next patch. I still reported it though. So I will monitor and hope for a quick fix.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 2 weeks later...

EDIT: I realized I had a very old version of MIST (1.1) so I updated. Now the script works, although it only spawns one unit in the group, not the whole group)

I'm trying for my first time with MIST and having some trouble. I can't figure out what the problem is.

 

I have MIST loaded successfully, then I want to have a group (of soldiers) cloned in a Trigger zone.

 

I had a DO SCRIPT trigger set up with the following:

mist.cloneInZone('Scientists1','Village West','true','20')

 

What I get back is this:

2GPVtgC.jpg

 

I don't know what I'm missing and searching this thread didn't give me any answers unfortunately. Can anyone help?


Edited by DynamicROFL
Solved it, mostly
Link to comment
Share on other sites

EDIT: I realized I had a very old version of MIST (1.1) so I updated. Now the script works, although it only spawns one unit in the group, not the whole group)

Try this:

mist.cloneInZone('Scientists1','Village West',true,20)

 

Best guess is it is failing on the last variable. It shouldn't be in quotes, it should be a number. The true value should also not be a string. true and false are special cases within lua. It doesn't really matter if you want the value passed to be true, but if you wanted it to be false then you wouldn't get what you were expecting. For example the following code would print out 'true' because 'false' and false are not the same thing.

 

local myVal = 'false'
if myVal == false then
	print('false')
else
	print('true')
end
end

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

I am still having issues with

 

coalition.addGroup

 

in 1.5.7 and 2.1. Previously working function using the the coalition.addGroup cause a CTD now. Is it me or is it the Scripting Engine?

 

PS: Using mist.dynAdd() doesn´t cause a CTD, using the same parameters with coalition.addGroup causes a CTD (latest 1.5.7 and 2.1)


Edited by SNAFU

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Sure:

 

	
--MISSION I: INTERCEPT HELI MISSION GENERATION
heliAImissiongroupnametable = {}
heliAImissiongroupnametable[1] = {groupname = "__helihuntmissiontemplate1"} 
heliAImissiongroupnametable[2] = {groupname = "__helihuntmissiontemplate2"} 
heliAImissiongroupnametable[3] = {groupname = "__helihuntmissiontemplate3"} 
heliAImissiongroupnametable[4] = {groupname = "__helihuntmissiontemplate4"} 
heliAImissiongroupnametable[5] = {groupname = "__helihuntmissiontemplate5"} 
heliAImissiongroupnametable[6] = {groupname = "__helihuntmissiontemplate6"}
heliAImissiongroupnametable[7] = {groupname = "__helihuntmissiontemplate7"}  
heliAImissiongroupnametable[8] = {groupname = "__helihuntmissiontemplate8"} 

spawnedmissionheliAItable = {}
heliinterceptmissionAICounter = #spawnedmissionheliAItable

helihuntwaypoints = {}
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Ambrolauri", endzonename = "Zestafoni"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zestafoni", endzonename = "Ambrolauri"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Kobuleti", endzonename = "Poti"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Poti", endzonename = "Kobuleti"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Batumi", endzonename = "Poti"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Poti", endzonename = "Batumi"}
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zugdidi", endzonename = "Tsageri"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zugdidi", endzonename = "Poti"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Poti", endzonename = "Zugdidi"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Senaki", endzonename = "Kobuleti"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Kobuleti", endzonename = "Senaki"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Ambrolauri", endzonename = "Senaki"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Senaki", endzonename = "Ambrolauri"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Tsageri", endzonename = "Senaki"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Senaki", endzonename = "Tsageri"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Dzhvari", endzonename = "Senaki"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Senaki", endzonename = "Dzhvari"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Gori", endzonename = "Zestafoni"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zestafoni", endzonename = "Gori"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zestafoni", endzonename = "Senaki"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Senaki", endzonename = "Zestafoni"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Chiatura", endzonename = "Gori"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Gori", endzonename = "Chiatura"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Chiatura", endzonename = "Tsageri"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Tsageri", endzonename = "Chiatura"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Tsageri", endzonename = "Zestafoni"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zestafoni", endzonename = "Tsageri"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Tsageri", endzonename = "Dzhvari"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zestafoni", endzonename = "Dzhvari"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Chiatura", endzonename = "Dzhvari"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Zugdidi", endzonename = "Kobuleti"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Kobuleti", endzonename = "Zugdidi"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Tsageri", endzonename = "Zugdidi"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Kobuleti", endzonename = "Dzhvari"}--
helihuntwaypoints[#helihuntwaypoints +1] = {startzonename = "Dzhvari", endzonename = "Chiatura"}



local heliAInumber = math.random(1,2)
local j = math.random(1,#heliAImissiongroupnametable)
local heliAIintrudergroupname = heliAImissiongroupnametable[j].groupname		
local helimissionAIgrouptable = {}
helimissionAIgrouptable = mist.getGroupData(heliAIintrudergroupname)
local heliinterceptmissionAItype = helimissionAIgrouptable["units"][1]["type"]
local heliinterceptmissionAIskin = helimissionAIgrouptable["units"][1]["livery_id"]
local heliinterceptmissionAIskill = helimissionAIgrouptable["units"][1]["skill"]
local heliInterceptMissionAIcountry = helimissionAIgrouptable["countryId"]
local heliAImissiontask = helimissionAIgrouptable["task"]

heliinterceptmissionAIpayload = mist.getPayload(heliAIintrudergroupname) 
local helispeed = 50
heliinterceptmissionAICounter = #spawnedmissionheliAItable + 1
local helirouterandomizer = math.random(1,#helihuntwaypoints)
local randomheliAIspawnzonename = helihuntwaypoints[helirouterandomizer].startzonename
heliinterceptmission = trigger.misc.getZone(randomheliAIspawnzonename)
heliinterceptmissionpos = {}
heliinterceptmissionposx = heliinterceptmission.point.x + math.random(heliinterceptmission.radius * -1, heliinterceptmission.radius)
heliinterceptmissionposz = heliinterceptmission.point.z + math.random(heliinterceptmission.radius * -1, heliinterceptmission.radius)
local heliinterceptmissionAIspawnalt = math.random(heliminAIspawnaltitude,helimaxAIspawnaltitude)
local heliinterceptmissionAIgroupname = 'Mission I:'..heliinterceptmissionAItype..' #:'..string.format(heliinterceptmissionAICounter)	
local heliinterceptmissionAIPatrolpointstable = {}
heliinterceptmissionAIPatrolpointstable[1] =
				{
					["alt"] = heliinterceptmissionAIspawnalt,
					["type"] = "Turning Point",
					["action"] = "Turning Point", 
					["alt_type"] = "RADIO",
					["formation_template"] = "",
					["ETA"] = 0,
					["airdromeId"] = 1,
					["y"] = heliinterceptmissionposz,
					["x"] = heliinterceptmissionposx,
					["speed"] = helispeed,
					["ETA_locked"] = true,
					["task"] =  heliAIwaypointtask,
					["speed_locked"] = true,
				}

										

local randomheliAIwaypointzonename = helihuntwaypoints[helirouterandomizer].endzonename
randomheliAIwaypointzone = trigger.misc.getZone(randomheliAIwaypointzonename)
local randomheliAIwaypointzoneposz = randomheliAIwaypointzone.point.z + math.random(randomheliAIwaypointzone.radius * -1, randomheliAIwaypointzone.radius)
local randomheliAIwaypointzoneposx = randomheliAIwaypointzone.point.x + math.random(randomheliAIwaypointzone.radius * -1, randomheliAIwaypointzone.radius)
heliinterceptmissionAIPatrolpointstable[2] =
				{
					["alt"] = heliinterceptmissionAIspawnalt + math.random(heliinterceptmissionAIspawnalt * -0.2, heliinterceptmissionAIspawnalt * 0.2),
					["type"] = "Turning Point",
					["action"] = "Turning Point",
					["alt_type"] = "RADIO",
					["formation_template"] = "",
					["properties"] = 
					{
						["vnav"] = 1,
						["scale"] = 0,
						["angle"] = 0,
						["vangle"] = 0,
						["steer"] = 2,
					}, -- end of ["properties"]
					["ETA"] = 230.54689194991,
					["y"] = randomheliAIwaypointzoneposz,
					["x"] = randomheliAIwaypointzoneposx,
					["speed"] = helispeed,
					["ETA_locked"] = false,
					["task"] = heliAIwaypointtask,
					["speed_locked"] = true,
				}
heliinterceptmissionAIPatrolpointstable[3] =
				{
					["alt"] = heliinterceptmissionAIspawnalt,
					["type"] = "Turning Point",
					["action"] = "Turning Point", 
					["alt_type"] = "RADIO",
					["formation_template"] = "",
					["ETA"] = 0,
					["airdromeId"] = 1,
					["y"] = heliinterceptmissionposz,
					["x"] = heliinterceptmissionposx,
					["speed"] = helispeed,
					["ETA_locked"] = true,
					["task"] =  heliAIwaypointtask,
					["speed_locked"] = true,
				}
											


local heliinterceptmissionAIPatrolunitstable = {}
if heliAInumber == 1
then
	heliinterceptmissionAIPatrolunitstable =	{
				[1] = 
				{
					["alt"] = heliinterceptmissionAIspawnalt,
					["heading"] = 0,
					["livery_id"] = interceptmissionAIskin,
					["type"] = heliinterceptmissionAItype,
					["psi"] = 0,
					["onboard_num"] = "10",
					["parking"] = 1,
					["y"] = heliinterceptmissionposz,
					["x"] = heliinterceptmissionposx,
					["name"] =  heliinterceptmissionAIgroupname,
					["payload"] = heliinterceptmissionAIpayload,
					["speed"] = helispeed,
					["unitId"] =  math.random(9999,99999),
					["alt_type"] = "RADIO",
					["skill"] = heliinterceptmissionAIskill,
				}, -- end of [1]
				}
elseif heliAInumber == 2
then
	heliinterceptmissionAIPatrolunitstable =	{
				[1] = 
				{
					["alt"] = heliinterceptmissionAIspawnalt,
					["heading"] = 0,
					["livery_id"] = heliinterceptmissionAIskin,
					["type"] = heliinterceptmissionAItype,
					["psi"] = 0,
					["onboard_num"] = "10",
					["parking"] = 1,
					["y"] = heliinterceptmissionposz,
					["x"] = heliinterceptmissionposx,
					["name"] =  heliinterceptmissionAIgroupname,
					["payload"] = heliinterceptmissionAIpayload,
					["speed"] = helispeed,
					["unitId"] =  math.random(9999,99999),
					["alt_type"] = "RADIO",
					["skill"] = heliinterceptmissionAIskill,
				}, -- end of [1]
				 [2] = 
				{
					["alt"] = heliinterceptmissionAIspawnalt,
					["heading"] = 0,
					["livery_id"] = heliinterceptmissionAIskin,
					["type"] = heliinterceptmissionAItype,
					["psi"] = 0,
					["onboard_num"] = "11",
					["parking"] = 2,
					["y"] = heliinterceptmissionposz +50,
					["x"] = heliinterceptmissionposx + 50,
					["name"] =  heliinterceptmissionAIgroupname.." #2",
					["payload"] = interceptmissionAIpayload,
					["speed"] = helispeed,
					["unitId"] =  math.random(9999,99999),
					["alt_type"] = "RADIO",
					["skill"] = heliinterceptmissionAIskill,
					},

				}
end

local heliinterceptmissionAIdata = 	{
					["modulation"] = 0,
					["tasks"] = 
					{
					}, -- end of ["tasks"]
					["task"] = heliAImissiontask,
					["uncontrolled"] = false,
					["route"] = 
							{
							["points"] = heliinterceptmissionAIPatrolpointstable,
							}, -- end of ["route"]
					["groupId"] = math.random(10000,99999),
					["hidden"] = false,
					["units"] = heliinterceptmissionAIPatrolunitstable, 
					["y"] = heliinterceptmissionposz,
					["x"] = heliinterceptmissionposx,
					["name"] =  heliinterceptmissionAIgroupname,
					["communication"] = true,
					["start_time"] = 0,
					["frequency"] = 124,
				}
coalition.addGroup(heliInterceptMissionAIcountry, Group.Category.HELICOPTER, heliinterceptmissionAIdata)

 

I guess this is related to a missing task? Since I wrote "heliAiwaypointtask" in the route table, but defined it above as "local heliAimissiontask". Will test it in the evening. This worked before 1.5.7 strangely.


Edited by SNAFU

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Cool. The bug was already fixed internally for 1.5.7 but it was never a problem in any other version I tested.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 2 weeks later...

I'm in need of a script or a mission that crashes DCS 1.5, either a CTD or freezing DCS. If anyone have a tip I would be glad. Currently tried a few Mist commands but it only get scripting errors and that does not make the test. Please PM me any mission ar script you think will crash server. Thanks :)

Link to comment
Share on other sites

  • 5 weeks later...

Country not found: third_reich

 

Open Alpha V 2.1.1.9459.269

Normandy Map

DCS: WWII Assets Pack

Mist 4.3.74

 

For a test miz I have one truck (Blitz_36-6700A) with the county set to Third Reich in the ME. and two zones.

 

When trying to use mist.teleportInZone I'm getting the following error:

 

SCRIPTING: MIST|1332: Country not found: third_reich

 

If I change the the truck country to something other, the truck teleports fine and everything works as it should.

 

In the .miz file the truck is listed as:

Snip:

}, -- end of ["group"]

}, -- end of ["vehicle"]

["name"] = "Third Reich",

}, -- end of [2]

}, -- end of ["country"]

 

With a MIST dumpDB's the truck is listed as:

 

["country"] = "third reich",

 

But nowhere can I find any third_reich. Anyone have any clues ?

Link to comment
Share on other sites

  • 2 weeks later...

I would like to call a teleport script that should be run as an advanced waypoint action, when a group reach a particoular wp it will teleport in a defined zone.

 

Buy I would like to teleport the group regardless to its name, so that I could rapidly create more groups with the same "teleport feature" simply by copy and paste in the mission editor

 

How could I sobstitute the "groupName" parameter in the mist function with the "self" name of the group?

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

@Grimes

 

Thanks for the work you did on MIST. I am not a Professional scripter and learned modifying the LUA files on my own. I am using a modified version of Jinx's CASCAP mission and wanted to add a JTAC unit close to a mist generated red group. Any help would be great.

 

link to original mission : https://www.digitalcombatsimulator.com/en/files/1411712/

i9 9900k, 64 Go RAM, RTX 4090, Warthog HOTAS Throttle & Stick, Saitek Combat Rudder, MFD Cougar, Trackir 5 Pro, Multipurpose UFC and Oculus Rift S (when I want some VR),

http://www.twitch.tv/zarma4074 /  https://www.youtube.com/user/Zarma4074 

 

Copy-of-DCS-A-10C-User-Bar-CMR-ConvertImage.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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