Jump to content

MIssion Scripting Tools (Mist)- enhancing mission scripting Lua


Recommended Posts

Hey guys i'm doing a large scale mission and here is my problem. I dont want enemy fighters to be up in the air right away so I checked the late activation box and did a trigger to start their task when I want… sô far so good. then when I splashed them they respawn after a certain amount like I want them to but they RTB without even engaging me or the ground units. here is what I set in the script: mist.respawnGroup('mig', true)

 

 

I started using mist this week so I am really not familiar with it yet but if someone could give me a clear answer it would be appreciated

 

Cheers

 

Pat

Link to comment
Share on other sites

  • 1 month later...

is MIST respawn function working for AI flights? I havent used MIST in a long time so I wanted to check in... If I recall, the MIST respawn no longer would respawn wingpairs and their AI logic would not have them attack ... they would just fly merrily along...

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Link to comment
Share on other sites

  • 2 weeks later...
in the Oman Armour line 12 trigger.misc.getzone should be trigger.misc.getZone

 

Thanks brother...it's always some mundane detail! On another pass, I caught another typo too...but unfortunately it still isn't working.

 

Grimes, I tried dyn spawning some Oman aircraft and that worked fine, so it's probably not a country problem...Idk what I'm missing now, but I'm just gonna close out these last couple posts to clean up the thread and get back with you guys after another 20hrs of frustration or so.

 

Thanks for checkin my work Quad

Link to comment
Share on other sites

The script worked when changing country to USA, are you sure Oman has the ground units you're trying to spawn? Not at pc ATM to check

 

Sent from my ONEPLUS A3003 using Tapatalk



I7 8700K @ 5Ghz | 32Gb DDR4 | Strix 1080ti | Warthog Throttle + Stick on Virpil T50 Base | Omen 32"

Link to comment
Share on other sites

Yeah you can spawn anything for anyone. Even works with weapons. To test it out I has spawned an Italian Mig-29 armed with Amraams. AI can us most weapon types even if players can't.

 

Sorry for the late reply, caught a touch of the flu and didn't spend a whole lot of time the last week or so on the computer.

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

Yeah you can spawn anything for anyone. Even works with weapons. To test it out I has spawned an Italian Mig-29 armed with Amraams. AI can us most weapon types even if players can't.

 

Sorry for the late reply, caught a touch of the flu and didn't spend a whole lot of time the last week or so on the computer.

 

 

Nice. No need to apologize, thanks for all the help and hope you're on the mend ~

Link to comment
Share on other sites

  • 2 weeks later...

Anyone has been able to respawn a Reaper via MIST ? Crashing DCS each time. The same lines work fine for any other unit :

 

 

function MA_respawnJTAC()

 

MA_out('Another JTAC is on the way!',10)

mist.respawnGroup('JTAC1', true)

 

end

 

 

with

 

 

function MA_out(strOutText,outTime) -- function outputs text using the mist message system

 

trigger.action.outText(strOutText, outTime)

trigger.action.outSound("l10n/DEFAULT/radio 2.ogg")

 

end

 

 

Log attached.

dcs.log-20190122-111426.zip


Edited by Zarma

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

When isolated it isn't crashing on that command.

 

Annoyingly the mission itself isn't wanting to load on my PC so I can't properly test it out.

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 can send you the mission but the script has more than 3700 lines so would be an hard work to find why it crashes. The JTAC is the only unit that crashes the game when respawning.

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

  • 3 weeks later...

You could build a unit table and pass it to getUnitsInZones.

 

For instance:

 

local units = {}
for uName, uData in pairs(mist.DBs.unitsByName) do
 if uData.type == 'F-14B' then
   table.insert(units, uName)
 end
end


local tomcatsInZone = mist.getUnitsInZones(units, 'dangerZone')

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

Ok found that if the JTAC is just orbiting, it respawns fine.

 

But if he has a tasking I sent via

 

local jtac = Group.getByName('JTAC1')

local target = Group.getByName('Red Target Group'):getID()

local Orbit = {

id = 'Orbit',

params = {

pattern = 'Circle',

point = unitSpawnZone,

altitude = 5000

}

}

jtac:getController():pushTask(Orbit)

 

local task = {

id = 'FAC_EngageGroup',

params = {

groupId = target,

weaponType = 2956984318,

designation = 'Laser',

datalink = true,

},

}

jtac:getController():pushTask(task)

 

local SetInvisible = {

id = 'SetInvisible',

params = {

value = true

}

}

jtac:getController():setCommand(SetInvisible)

 

local SetImmortal = {

id = 'SetImmortal',

params = {

value = true

}

}

jtac:getController():setCommand(SetImmortal)

 

And respawn, DCS crash. So I took off the "true" bolean and added an orbit tasking. But now it wont accept new taskings when new targets spawn.

 

Is there a way to respawn it with the original taskings, before it was modified with the getController():setCommand ?

 

 

Still working on it LOL


Edited by Zarma

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

  • 2 months later...

Hi all, I appear to have a recent issue in that the F10 menu randomly doesn’t always show all my MIST items. E.g. it won’t show CTLD or CSAR options. (But "current JTAC" will show) Jump out of that Huey into another aircraft or into spectators then back into the same Huey and it’s fine. Other times it all works fine from mission start. (Single and multiplayer)

Been trying to resolve this for a few days now with no luck but last night I was on a different server with a different mission and someone else told me they have the same issue on other servers and missions that use CTLD and CSAR (and obviously MIST)

I’ve down loaded all new MIST & CTLD & CSAR file and reloaded them just to check that one of my changes to the files wasn’t the culprit.

Any help would be greatly appreciated. Have an outstanding day all. :-)

:pilotfly:

[sIGPIC][/sIGPIC]

 

:gun_smilie:

 

229th Assault Helicopter Battalion - Always Recruiting

 

If you have a passion for helicopter flight simulation and would like to fly in a friendly and supportive online multiplayer environment, then you’ve just put your skids down safely on the right page…!

 

DCS Squadron Recruiting Page for the 229th

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

 

For details see our website at:

http://1stcavdiv.forumotion.net/

Link to comment
Share on other sites

Those menus aren't added via mist, they are just using the standard scripting engine functions to do it.

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

Thank you Grimes, could you possibly suggest where I look to try and resolve this issue..?

Thanks again.. :-)

:pilotfly:

[sIGPIC][/sIGPIC]

 

:gun_smilie:

 

229th Assault Helicopter Battalion - Always Recruiting

 

If you have a passion for helicopter flight simulation and would like to fly in a friendly and supportive online multiplayer environment, then you’ve just put your skids down safely on the right page…!

 

DCS Squadron Recruiting Page for the 229th

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

 

For details see our website at:

http://1stcavdiv.forumotion.net/

Link to comment
Share on other sites

  • 3 weeks later...

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