Jump to content

Zarma

Members
  • Posts

    1346
  • Joined

  • Last visited

Everything posted by Zarma

  1. 12 missions. Already flew 10 of them. Great missions but still a few bugs to correct.
  2. Hi Grimes. I have been using a mission called CASCAP for years (created by Jinx) and trying to keep it up to date and add some events. But since patch 2.9 I have a problem with the air-to-ground taskings that I can't solve (not a lua expert at all, learning with tries). That is one example of the spawning script : function MA_createTask12(zoneName) -- easy tasking local unitType local NpointH local zone = trigger.misc.getZone(zoneName) repeat --Find a random spot of LAND within the large AO zone unitSpawnZone1 = mist.getRandPointInCircle(zone.point, zone.radius) NpointH = land.getHeight(unitSpawnZone1) unitSpawnZone = mist.utils.makeVec3(unitSpawnZone1, NpointH) until land.getSurfaceType(unitSpawnZone1) == land.SurfaceType.LAND local units = {} groupSize = 3 + mist.random(3) local i for i = 1, groupSize do --Insert a random number (min 1, max 5)of random (selection 14 possible) vehicles into table units{} local randomNumber = mist.random(14) if randomNumber == 1 then unitType = 'Ural-375 ZU-23' elseif randomNumber == 2 then unitType = 'ZSU-23-4 Shilka' elseif randomNumber == 3 then unitType = 'Strela-1 9P31' elseif randomNumber == 4 then unitType = 'Strela-10M3' elseif randomNumber == 5 then unitType = 'BTR-80' elseif randomNumber == 6 then unitType = 'BMD-1' elseif randomNumber == 7 then unitType = 'BMP-1' elseif randomNumber == 8 then unitType = 'BMP-2' elseif randomNumber == 9 then unitType = 'BMP-3' elseif randomNumber == 10 then unitType = 'BRDM-2' elseif randomNumber == 11 then unitType = 'T-55' elseif randomNumber == 12 then unitType = 'T-72B' elseif randomNumber == 13 then unitType = 'T-80UD' elseif randomNumber == 14 then unitType = 'T-90' end repeat --Place every unit within a 100m radius circle from the spot previously randomly chosen unitPosition = mist.getRandPointInCircle(unitSpawnZone, 100) until land.getSurfaceType(unitPosition) == land.SurfaceType.LAND table.insert(units, { ["x"] = unitPosition.x, ["y"] = unitPosition.y, ["type"] = unitType, ["name"] = 'Red Target Group Unit ' .. i, ["heading"] = 0, ["playerCanDrive"] = true, ["skill"] = "Random" }) end for i = 1, groupSize*3 do --Insert three times as many infantry soldiers as there are vehicles in the group into the table units{} unitType = 'Soldier AK' repeat --Place every unit within a 100m radius circle from the spot previously randomly chosen unitPosition = mist.getRandPointInCircle(unitSpawnZone, 100) until land.getSurfaceType(unitPosition) == land.SurfaceType.LAND table.insert(units, { ["x"] = unitPosition.x, ["y"] = unitPosition.y, ["type"] = unitType, ["name"] = 'Red Target Group Unit ' .. groupSize+i, ["heading"] = 0, ["skill"] = "Random" }) end mist.dynAdd({country = 'RUSSIA', category = 'GROUND_UNIT', name = 'Red Target Group', hidden = false, units = units }) --Create and spawn the group --Code to notify the clients of the new objective MGRS grid location. A message is displayed, and also added to F10 menu for continuous review mgrs = coord.LLtoMGRS(coord.LOtoLL(unitSpawnZone)) mgrsString = mist.tostringMGRS(mgrs, 3) lat, lon = coord.LOtoLL(unitSpawnZone) llString = mist.tostringLL(lat, lon, 2) ll2String = mist.tostringLL(lat, lon, 0, true) brString = MA_getBearingRange() QFE = mist.utils.round((env.mission.weather.qnh * 1.33322) - ((land.getHeight(unitSpawnZone1)/0.3048)/30),2) elev = mist.utils.round(land.getHeight(unitSpawnZone1) * 3.28084) _targetInfoPath = missionCommands.addSubMenu('Target information', _taskingsGroundPath) missionCommands.addCommand('TARGET: Group of ' .. groupSize .. ' vehicles and infantry.', _targetInfoPath, MA_emptyFunction) missionCommands.addCommand('LAT LON: ' .. llString .. '.', _targetInfoPath, MA_emptyFunction) missionCommands.addCommand('LAT LON: ' .. ll2String .. '.', _targetInfoPath, MA_emptyFunction) missionCommands.addCommand('MGRS/UTM: ' .. mgrsString .. '.', _targetInfoPath, MA_emptyFunction) missionCommands.addCommand(brString, _targetInfoPath, MA_emptyFunction) missionCommands.addCommand('QFE: '.. QFE .. ' mbar / ' .. elev .. ' feet.', _targetInfoPath, MA_emptyFunction) _targetMarkersPath = missionCommands.addSubMenu('Target markers', _taskingsGroundPath) missionCommands.addCommand('Request smoke on target area', _targetMarkersPath, MA_smokeRequested) missionCommands.addCommand('Request illumination flare over target area', _targetMarkersPath, MA_illBombRequested) missionCommands.addCommand('Skip current objective', _taskingsGroundPath, MA_skipTask) MA_out('An enemy group of ' .. groupSize .. ' vehicles and infantry has been located. Consult your F10 radio commands for more information.', 5) groupAliveCheckTaskID = mist.scheduleFunction(MA_groundGroupAliveCheck,{},timer.getTime()+5) local con = Group.getByName('Red Target Group'):getController() -- con:setOption(0, 0) --fire at will con:setOption(9, 2) --radar on mist.respawnGroup('JTAC1') local jtac = Group.getByName('JTAC1') local target = Group.getByName('Red Target Group'):getID() local Orbit = { id = 'Orbit', params = { pattern = 'Circle', point = unitSpawnZone1, altitude = 5000 } } jtac:getController():pushTask(Orbit) local task = { id = 'FAC_EngageGroup', params = { groupId = target, weaponType = 2956984318, frequency = 252, 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) Script = { id = 'CTLD.lua', params = { command = ctld.JTACAutoLase('JTAC1', 1674) } } end If I skip it using a destroy() function, I can ask a new group just fine. But if I kill the group and ask a new one, the group spawn but the script ends and the new radio menu with the coordinates isn't generated and the JTAC doesn't spawn. (MA_taskCompleted just rebuilds the F10 radio menu to be able to ask a new tasking) : function MA_groundGroupAliveCheck() local groupName = 'Red Target Group' if Group.getByName(groupName) and Group.getByName(groupName):isExist() == true and #Group.getByName(groupName):getUnits() > 0 then groupAliveCheckTaskID = mist.scheduleFunction(MA_groundGroupAliveCheck,{},timer.getTime()+5) else MA_taskCompleted() end end In the DCS log, the error is "attempt to index local 'avgPosT' (a nil value)". The line number gives the reference to this part : function MA_getBearingRange() local avgPos = MA_getAvgPos('Red Target Group') local ref = mist.utils.makeVec3(mist.DBs.missionData.bullseye.blue, 0) local vec = {x = avgPos.x - ref.x, y = avgPos.y - ref.y, z = avgPos.z - ref.z} local dir = mist.utils.round(mist.utils.toDegree(mist.utils.getDir(vec, ref)), 0) local dist = mist.utils.get2DDist(avgPos, ref) local distMetric = mist.utils.round(dist/1000, 0) local distImperial = mist.utils.round(mist.utils.metersToNM(dist), 0) dir = string.format('%03d', dir) return 'Target area: Bulls ' .. dir .. ' for ' .. distMetric .. 'km/' .. distImperial .. 'nm' end This value isn't nil at first spawn, but each time at second spawn when the group is destroyed by a player (and not skipped). Tried to simply delete the BullsEye reference part but then the JTAC doesn't fly to the group to orbit. This turns me crazy and I don't know what did change in DCS 2.9 to create this bug. Sorry for the long post but any help would be appreciated. PS : whole script is attached. CASCAP Infinity Georgia West.lua
  3. Another DLC is in preparation. Currently beta testing it, hopefully will be release soon.
  4. Lima's are also heavier than Kilo's hellfire. And the US Apache has less powerful engines than thae UK one, reason why they often didn't mount the FCR. Was is on you heli ?
  5. Yep should have been corrected in the hotfix but still turning left or right alone.
  6. Haven't try other modules, bnullut in the A10Cv2, the TGP is visible without NVG in IR and BTH mode. See attached screen.
  7. Zarma

    Key bindings

    Viggen has it...
  8. Zarma

    Key bindings

    Hello. After seeing Wag's latest video, could it be possible to use the same bindings for the open radio menu and the VOIP push-to-talk. Right now, I have the same shortcuts in SRS and DCS radio menus. I don't want to double the bindings on my hotas, as the comm already use plenty (4 for the Hornet, 3 for the A10C etc)
  9. Baltic Dragon and Casmo are creating the official campaign. But probably waiting for the FCR and/or the datalink.
  10. Strange as pilot I have it to the right and as CPG to the left. But in VR as pilot at the top and as CPG in the middle....
  11. Hi. Using latest version of MIST and CTLD, with real sling enabled. Had to turn the ctld.forceCrateToBeMoved to FALSE because the script wasn't detecting the sling transport. Even when moving the crates to 10+ km, we had the message "Sorry you must move this crate before you unpack it!"
  12. Hi ! Just flew it as CPG with a buddy piloting. Great fun and success. Keep up the nice job. Will have to test your other missions now.
  13. you can do it whatever is in the ME
  14. Zarma

    Markpoints

    Hi I have no problem to create markpoints but how do you use them as steerpoint or targetpoint ?
  15. you have to modify a LUA file to have 1 flare for MAN CMD 1 and 1 chaff for MAN CMD 2. But will be replaced with next patch..
  16. the WSO has 2 hand grips so you need to be sure to use have the correct MFD selected.
  17. Does someone have a version with 1 page per page in Adobe instead of 2 ?
  18. not sure the ME settings change anything...
  19. that's all the server that haven't been patched.
×
×
  • Create New...