Jump to content

MIssion Scripting Tools (Mist)- enhancing mission scripting Lua


Recommended Posts

Invisibull made the same comment that GCICAP has stopped working on NTTR. I haven't got time to follow up on it at the moment due to work stuff but the obvious change is the additional air bases. A lot of stuff hangs on the script getting the details of airbases into a table so possibly something is going wrong there. Perhaps the returned values from coalition.getAirbases are different somehow and the script can't deal with it??? That's just a guess anyway. Invisibull was PMing lukrop so perhaps he'll look at it.

 

Thanks Stonehouse. I kinda figured it was something along those lines because it was working before the update and it seems quite a bit was changed under the hood. I'll watch that thread for an update.

 

 

Sierra

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

  • 4 weeks later...

Hello.

 

I am trying to use the Unit.getRadar, so i can use the second value. It means the tracked unit, but I cant.

 

ref: http://wiki.hoggit.us/view/DCS_func_getRadar

 

I am doing this, and only get Nil values for target.

 

 

function check()

local _unit = Unit.getByName('radar')
local working, target = _unit:getRadar()


if working == true then	

trigger.action.outText("detecting  ".. tostring(target),20)
else
trigger.action.outText("No detection",20)
end
timer.scheduleFunction(check, {}, timer.getTime() + 4)
end
check()


Edited by ESAc_matador
Link to comment
Share on other sites

Solved....

 

function check()

local UnitObject = Unit.getByName('radar')
local status, target = UnitObject:getRadar()

if status == true then
	if target ~= nil then
	local targetname = target:getName()
	trigger.action.outText("detecting  "..targetname,20)		
	end
else
trigger.action.outText("No detection",20)
end
timer.scheduleFunction(check, {}, timer.getTime() + 4)
end
check()

Link to comment
Share on other sites

Unit.getGroup(event.initiator):getName() is broken with new patch: 1.5.5.60338

 

+1

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Logitech G940 HOTAS, Turtle Beach VelocityOne Rudder.

Link to comment
Share on other sites

Hello,

 

There is something broken with the latest patch.

Unit.getGroup(event.initiator):getName() is broken with new patch: 1.5.5.60338

 

+1

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

missionCommands.addCommandForGroup

 

I assume the above applies to spawned groups? Hence the current error?

 

I really wanted to get on my GCICAP template tonight with the Spit... :(

 

Hope we get a hotfix.

 

Suggest you use the guidelines in this post to revert to an earlier version of DCS until this bug is resolved.

 

https://forums.eagle.ru/showthread.php?t=114030

 

I mean, spitfire is nice, but if you aren't using the new module, or are not really awaiting any added fixes, then this revert process can help.

There is always a choice.

 

DCS_updater.exe update 1.5.5.59992@release

 

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

So I have a quick question for the people who work under the hood of MIST. Are problems like these normally changed by ED on purpose? On accident? Or new code for new module?

 

AND...

 

Is it up to you to change MIST to work with new code? Or do you identify the issue to ED and wait for them to correct the errant code?

 

NOT throwing rocks at anyone or complaining, just curious how this all works.

 

Sierra

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

Usually its a bug of some kind. It is especially odd if it worked on the initial patch but then something in the hotfix broke it. If anything it reinforces the idea of "99 bugs in the code, take one down, patch it around, 127 bugs in the code". Stuff breaks without rhyme or reason.

 

As far as who needs to fix it, the answer is essentially both. The reason this error is occurring is because of a bug in DCS, so that is up to ED to fix. I can mitigate the error within mist, but any functionality associated with that bug will continue to be lost.

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

Dynamically spawned aircraft groups aren't currently accessible to the scripting engine. Suffice to say I've reported the bug and set its severity to block.

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

Can we detect smoke marker rockets in triggers? I know how to access rocket type with weapon.flag, i can access vec3 position of rocket, but how i can detect ground hit?

We have trigger condition "missile in zone" but it condition can't detect smoke marker rocket.

I just need trigger zone that detect smoke.

 

https://forums.eagle.ru/showpost.php?p=2633131&postcount=1

 

Works with rickets...:thumbup:

 

Sierra

 

ROckets too...

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

I want to be able to spawn in random enemy fighter aircraft with the task to search and engage in zone.

 

Been using the command below with great success. Ive created one flight per spawn location/altitudeHighorLow/Aircraft type/groupsize1or2.

mist.cloneGroup ('1xMiG-21', true)

 

When adding more planes i see this is not a good solution as i need to create sooo many planes and triggers.

 

I was thinking i could use mist.cloneinzone to make it a bit better. That way i could only create one aircraft and randomly spawn in different zones. With cloneGroup you set it to use the current task with true. But with cloneInZone i cannot set the true command and the flight will just RTB as soon as they spawn in.

mist.cloneInZone('1xMiG-21', true {'zone1', 'zone2', 'zone3', 'zone4', 'zone5', 'zone7', 'zone8'})

 

Questions

1. What would be a better way to spawn in random type of aircraft at random location. Random flight size? Ready to learn. :)

2. How can i use the CloneInZone so the group keeps its current task?

[sIGPIC][/sIGPIC]

 

We are looking for Swedish members!

http://www.masterarms.se

Link to comment
Share on other sites

Dynamically spawned aircraft groups aren't currently accessible to the scripting engine. Suffice to say I've reported the bug and set its severity to block.

 

A true grinder. Thanks Grimes. This might explain why my server is crashing with the random air traffic script...

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Anything abstract / not working about the "group patrol route" function?

 

Does it need to be entered as an overall trigger or as a last waypoint advanced entry?

 

Edit: Okay well now that I'm at the computer- I've tried both and both crash out.

 

This is what I've put both in the advanced waypoint trigger as well as in the basic trigger for the group.

 

do

 

local vars = {}

vars.gpData = 'm',

vars.offRoadForm = 'diamond'

vars.pType = 'doubleBack'

mist.ground.patrolRoute(vars)

end

 

In the advanced trigger even though I save it there in the last waypoint it just gets deleted... I tried saving it again- deleted. Okay- maybe just not the right spot.

 

This is copy and pasted from the hoggit "groundpatrolroute" entry with my slight adjustment for group name. It's not a dynamic group obviously... so not sure what I'm doing wrong?


Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Curious about your situation- if you're teleporting units it should just move the same unit. I'm having some issues with some "cloned" groups- which are different (I think) since they are actually generated dynamically and are out of reach from the mission scripting engine.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

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...