Jump to content

Death Merchant

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Death Merchant

  1. Mist is awesome. I'm learning it right now. Are there any sample scripts that I can look at to help me learn? Thanks, DM
  2. Is it possible to send a Datalink target from a ground unit to a Ka-50? I'm working on a Border Defense mission where Ka-50 pilots will be responding to attacks at border stations. I know I can send coords via screen messages, but can a Datalink target be sent directly to Ka-50s? Thanks, DM
  3. Is it possible to send a Datalink target from a ground unit to a Ka-50? I'm working on a Border Defense mission where Ka-50 pilots will be responding to attacks at border stations. I know I can send coords via screen messages, but can a Datalink target be sent directly to Ka-50s? Thanks, DM
  4. That works beautifully, thanks for the suggestion, but I'm having one problem. When I spawn using coalition.addGroup() the Mi-24P spawns with empty pylons, even though I have them in the unit table. I'm having trouble finding an example of the format for the table, except for the one here: https://wiki.hoggitworld.com/view/DCS_exam_group_heli Is there a collection of sample missions/scripts somewhere I can look at? Thanks for all the help, I really appreciate your time. DM
  5. Thanks for the clarification on the dynAdd function. Perhaps you can offer a suggestion on how to accomplish the following: This part works: The mission has a list of start and stop zones (CS-*, and CE-*). The mission spawns a random number of convoys that start at a random zone and drive to a random zone using coalition.addGroup and mist.groupToRandomZone. What I'd like to do is spawn a helo tasked with escorting the group along it's route. Any thoughts? coalition.addGroup? Thanks for the help. DM
  6. How an I going to tanker without auto-throttle?
  7. I'm trying us dynAdd to add an Mi-24P to escort a convoy. The helo spawns with unit name Escort-2-1 as expected, but the group name is RUSSIA hel 1. The pylons are also empty. When I try to get it's route using mist.getGroupRoute("Escort-2") I get an error. Can you tell me what's wrong with this code? if heloAdded == false then BASE:E("##### Helo Info #####") BASE:E("## Truck Group Data ##") local TruckData = mist.getGroupData("Truck") BASE:E(TruckData) BASE:E("## Helo Info ##") local HeloData = mist.getGroupTable("Escort") BASE:E(HeloData) --###### Spawn Escort #####-- BASE:E("##### Spawn Escort #####") local GroupData = mist.getGroupData("Escort", true) BASE:E(GroupData) BASE:E("##### Following Group #####") BASE:E(GroupID) --##### Helo Unit Info #####-- local HeloGroupID = mist.getNextGroupId() local HeloUnitID = mist.getNextUnitId() local EscortUnits = { [1]= { ['alt']=361.97297275484, ['alt_type']='BARO', ['livery_id']='af 440 ovp', ['skill']='High', ['ropeLength']=15, ['speed']=11.669422301483, ['AddPropAircraft']= { ['TrackAirTargets']=true, ['SimplifiedAI']=false, ['ExhaustScreen']=true, ['PilotNVG']=true, ['GunnersAISkill']=90, ['R60equipment']=true, ['OperatorNVG']=true, }, ['type']='Mi-24P', ['unitId']=HeloUnitID, ['psi']=-0.4111427285092, ['x']=8926.4008762495, ['y']=74360.971148126, ['unitName']='Escort-2-1', ['groupName']='Escort-2', ['payload']={ ['pylons']={ [1]={['CLSID']={'2x9M220_Ataka_V'}}, [2]={['CLSID']={'APU-60-1_R_60M'}}, [5]={['CLSID']={'APU-60-1_R_60M'}}, [6]={['CLSID']={'2x9M220_Ataka_V'}}, }, ['fuel']=1701, ['flare']=192, ['ammo_type']=1, ['chaff']=0, ['gun']=100, ['restricted']={}, }, ['onboard_num']='016', ['callsign']='107', ['heading']=5.1035771188166, ['point']= { ['y']=74360.971148126, ['x']=8926.4008762495, }, ['category']='helicopter', ['country']='russia', ['groupId']= HeloGroupID, ['coalition']='red', ['countryId']=0, }, } local EscortRoute = { [1] = { ["alt"] = 500, ["type"] = "TakeOffGroundHot", ["action"] = "From Ground Area Hot", ["alt_type"] = "BARO", ["form"] = "From Ground Area Hot", ["y"] = 74367.382190126, ["x"] = 8872.6877408358, ["speed"] = 41.666666666667, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["key"] = "CAS", ["id"] = "EngageTargets", ["number"] = 1, ["auto"] = true, ["params"] = { ["targetTypes"] = { [1] = "Helicopters", [2] = "Ground Units", [3] = "Light armed ships", }, ["priority"] = 0, }, }, [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Follow", ["number"] = 2, ["params"]= { ["lastWptIndexFlagChangedManually"] = true, ["groupId"] = GroupID, ["lastWptIndex"] = 2, ["lastWptIndexFlag"] = true, ["pos"]= { ["y"] = 457.2, ["x"] = -76.2, ["z"] = 200, }, }, }, }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] }, -- end of [1] } vars = { units = EscortUnits, country = 0, category = 'helicopter', route = EscortRoute, } mist.dynAdd(vars) Route = mist.getGroupRoute("Escort-2", true) BASE:E("##### Escort-2 Route #####") BASE:E(Route) heloAdded = true BASE:E(heloAdded) end end I'm using this code after spawning a random convoy, with a random start and destination. The group ID to follow is the group ID of the last unit in the convoy.
  8. The Helo is spawning with the Unit Name Escort-1, but with the Group Name RUSSIA hel 1. I'm looking for more examples of the tables needed to use this function, but I'm not finding much. I've updated the units table: local EscortUnits = { [1]= { ['alt']=361.97297275484, ['alt_type']='BARO', ['livery_id']='af 440 ovp', ['skill']='High', ['ropeLength']=15, ['speed']=11.669422301483, ['AddPropAircraft']= { ['TrackAirTargets']=true, ['SimplifiedAI']=false, ['ExhaustScreen']=true, ['PilotNVG']=true, ['GunnersAISkill']=90, ['R60equipment']=true, ['OperatorNVG']=true, }, ['type']='Mi-24P', ['unitId']=HeloUnitID, ['psi']=-0.4111427285092, ['x']=8926.4008762495, ['y']=74360.971148126, ['unitName']='Escort-2-1', ['groupName']='Escort-2', ['payload']={ ['pylons']={ [1]={['CLSID']={'2x9M220_Ataka_V'}}, [2]={['CLSID']={'APU-60-1_R_60M'}}, [5]={['CLSID']={'APU-60-1_R_60M'}}, [6]={['CLSID']={'2x9M220_Ataka_V'}}, }, ['fuel']=1701, ['flare']=192, ['ammo_type']=1, ['chaff']=0, ['gun']=100, ['restricted']={}, }, ['onboard_num']='016', ['callsign']='107', ['heading']=5.1035771188166, ['point']= { ['y']=74360.971148126, ['x']=8926.4008762495, }, ['category']='helicopter', ['country']='russia', ['groupId']= HeloGroupID, ['coalition']='red', ['countryId']=0, }, } It's still not working.
  9. Greetings coding gurus, I am trying to use the mist.dynAdd function to spawn an Mi-24P and load a route so that it will follow a convoy based on a Unit ID. The helo is spawning properly but doesn't seem to load the route properly, it is also spawned with empty pylons for some reason. After spawning I use Route = mist.getGroupRoute("Escort-2", true) to try to grab the route and output it via BASE:E(Route) but this error message: 2023-07-25 11:29:59.528 ERROR SCRIPTING (Main): MIST|getGroupRoute|8171: Escort-2 not found in mist.DBs.MEgroupsByName Here is the code I am using. I figure there is a problem with the tables I have created. local EscortUnits = { [1]= { ['alt']=361.97297275484, ['point']= { ['y']=74360.971148126, ['x']=8926.4008762495, }, ['alt_type']='BARO', ['livery_id']='af 440 ovp', ['onboard_num']='016', ['category']='helicopter', ['unitName']='Escort-2-1', ['AddPropAircraft']= { ['TrackAirTargets']=true, ['SimplifiedAI']=false, ['ExhaustScreen']=true, ['PilotNVG']=true, ['GunnersAISkill']=90, ['R60equipment']=true, ['OperatorNVG']=true, }, ['type']='Mi-24P', ['country']='russia', ['psi']=-0.4111427285092, ['groupId']= HeloGroupID, ['groupName']='Escort-2', ['skill']='High', ['coalition']='red', ['x']=8926.4008762495, ['payload']={ ['pylons']={ [1]={['CLSID']={'2x9M220_Ataka_V'}}, [2]={['CLSID']={'APU-60-1_R_60M'}}, [5]={['CLSID']={'APU-60-1_R_60M'}}, [6]={['CLSID']={'2x9M220_Ataka_V'}}, }, }, ['callsign']='107', ['heading']=5.1035771188166, ['unitId']=292, ['y']=74360.971148126, ['countryId']=0, ['speed']=11.669422301483, }, } local EscortRoute = { [1] = { ["alt"] = 500, ["type"] = "TakeOffGroundHot", ["action"] = "From Ground Area Hot", ["alt_type"] = "BARO", ["form"] = "From Ground Area Hot", ["y"] = 74367.382190126, ["x"] = 8872.6877408358, ["speed"] = 41.666666666667, ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["enabled"] = true, ["key"] = "CAS", ["id"] = "EngageTargets", ["number"] = 1, ["auto"] = true, ["params"] = { ["targetTypes"] = { [1] = "Helicopters", [2] = "Ground Units", [3] = "Light armed ships", }, ["priority"] = 0, }, }, [2] = { ["enabled"] = true, ["auto"] = false, ["id"] = "Follow", ["number"] = 2, ["params"]= { ["lastWptIndexFlagChangedManually"] = true, ["groupId"] = GroupID, ["lastWptIndex"] = 2, ["lastWptIndexFlag"] = true, ["pos"]= { ["y"] = 457.2, ["x"] = -76.2, ["z"] = 200, }, }, }, }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] }, -- end of [1] } vars = { units = EscortUnits, country = 0, category = 'helicopter', groupName = 'Escort-2', groupID = GroupID + 1, clone = false, route = EscortRoute, } mist.dynAdd(vars) Route = mist.getGroupRoute("Escort-2", true) BASE:E("##### Escort-2 Route #####") BASE:E(Route) heloAdded = true BASE:E(heloAdded) Thanks for the help, DM
  10. How are you trying to get the weapon info? Weapon = Event.weapon:getCategory() Should return the value of the category. https://wiki.hoggitworld.com/view/DCS_Class_Weapon Do you mind sharing your code? I have built something similar using S_EVENT_HIT to record kills. Sometimes you need to do some error handling such as: if Event.initiator.country ~= nil then
  11. Yep, bad definition. I forgot I was pulling names from a table, and not the zone object. This fixed it: SA19Spawn:SpawnInZone(ZONE:FindByName(samZone["Zone"]), true) -- Add Tunguska to SAM Zone Thanks for the help, DM
  12. Can someone help me with this error? 2023-07-19 11:06:35.385 ERROR SCRIPTING (Main): Mission script error: [string "C:\Users\James\AppData\Local\Temp\DCS.openbeta\/~mis00001939.lua"]:19167: attempt to call method 'GetRandomVec2' (a nil value) stack traceback: [C]: in function 'GetRandomVec2' [string "C:\Users\James\AppData\Local\Temp\DCS.openbeta\/~mis00001939.lua"]:19167: in function 'SpawnInZone' [string "C:\Users\James\AppData\Local\Temp\DCS.openbeta\/~mis0000581A.lua"]:336: in function 'LoadRandomSAMs' [string "C:\Users\James\AppData\Local\Temp\DCS.openbeta\/~mis0000581A.lua"]:426: in main chunk I'm trying to spawn a unit at a random location in a zone. local randSpawn = math.random(5) BASE:E("Tunguska if 3 or less.") BASE:E(randSpawn) if randSpawn <= 3 then SA19Spawn:SpawnInZone(samZone, true) -- Add Tunguska to SAM Zone BASE:E("Spawning SA-19") end The other units are spawning properly, but I get an error when MOOSE tries to call the GetRandomVec2 function. Any thoughts? Thanks, DM
  13. Yep.. we're taking it offline. No worries.
  14. Yeah, alt is engaged, I can tell by the *. I'm in Baro. It only works if I trim well, but won't hold in turns. Hhmmm.. I've been having problems in MP. I'll try it in a local mission and see if it acts differently.
  15. Thanks for the help. The only copy I managed to find is a pretty crappy scan. Would you mind pinging me on discord, if you have a decent copy that you would be willing to share? Death-Merchant#5860
  16. The autopilot does not seem to hold altitude very well. I find myself constantly adjusting the trim to keep the aircraft at the right altitude. Is this normal, or am I doing something wrong? I take the time to trim the aircraft before setting the AP to Alt, but it doesn't seem to help. Thanks, DM
  17. What is the RL manual? Real-Life? Do you have a link? Thanks.
  18. How does one find the TO speed? I haven't been able to find any info on speeds for TO, climb, cruise, etc. Is there info on typical mission profiles for speeds and altitudes? I typically fly the F-18 via the FPAS page.
  19. Grimes, "Suppose you can screenshot em and work from there. " That's exactly what I did. Thanks for the help.
  20. Grimes, Thanks, but that's not quite what I am looking for. When I am in the mission editor, and I place a Static Hangar A, there is an Icon/image of the hangar that is shown in the mission editor. That's what I am looking for. Based on it's scalability, I assume it is some sort of vector file and not a static JPEG. I am working on an external ground target editor, and although I have the basic grid system worked out. It's hard to place statics accurately because I have no representation of their size and shape. Any ideas? DM
  21. I am working on a ground target generation system, and would like to use the same Icons that are used for buildings and such in the mission editor. Does anyone know where the images are located?
  22. Hey, thanks! That's not a bad solution. Now it have me thinking that another way might be to use the coalition.addGroup() command after a trigger for the base being captured.
  23. Is there a way to make an Airbase useable with Client Aircraft after it has been captured, while the mission is running? The airbase capture is automatic from what I can see. It seems that the simplest way to make it useable would be to load a static template of the aircraft that you want to make available at the airbase. Is there a way to do that? Is there a different way to give the same result? Thanks, DM Let me know if you'd like to join us on the Death Dealers Server.
  24. I'm using MOOSE for scripting, but I'm having a problem with it Spawning my Hidden Units as Visible. RosSARSpawn = SPAWN:New("RosSAR") RosSAR = RosSARSpawn:Spawn() RosSAR:HandleEvent(EVENTS.Land) function RosSAR:OnEventLand(EventData) RosSAR = RosSARSpawn:Spawn() end It's a simple script that spawns a SAR bird to follow the Roosevelt, and respawn when the unit lands. It works great, except I have the SAR bird Hidden in the ME, but in Multi-Player, the unit is visible on the F10. In SP it's not visible on the F10. I was wondering if there was a way in MOOSE to specify that the Spawn is hidden. I've tried adding :SpawnVisible(false), but I got an error. Any ideas? DM
×
×
  • Create New...