Jump to content

Fatie89

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Fatie89

  1. On 12/9/2022 at 12:16 AM, Grimes said:

    https://github.com/ciribob/DCS-CTLD

    It is a script that handles troop transport that was created before ED added the functionality to DCS. You can have unlimited groups and it tasks the infantry to run to enemy forces automatically. 

    Thanks! I've managed to brute force it so that the infantry now teleports to the chopper. The inf then just stand still as they seem to not be able to see the enemy. With CTLD I might get it to work. Once again, thank you.

  2. 13 hours ago, Grimes said:

    That is a bit of a headache to figure out. It would be almost better to just use CTLD to handle it for all rather than a combination of triggers/scripting for the mod aircraft and in game functionality for the rest. At least how you have the triggers setup this is where scripting becomes extremely powerful because it doesn't take much to get the same result with a small amount of code. 

     

    local acTbl = {"Blue Client 23", "Blue Client 25"}
    local cargoLoaded = {}
    local troops = {}
    for i = 1, 10 do
      table.insert(troops, "Green 1 Inf " .. i)
    end
    local troopIndex = 0
    local function disembark(vars)
      local unit = Unit.getByName(vars.unitName)
      if unit then 
        if cargoLoaded[vars.unitName]  then -- unit is alive and has cargo
          mist.teleportToPoint({groupName= cargoLoaded[vars.unitName], point= unit:getPoint() , action='teleport', radius = 20, innerRadius = 10})
          cargoLoaded[vars.unitName] = nil	-- deletes the cargo from the DB
        else
          -- Hey you don't have any cargo loaded, so do nothing or display a message to them. 
        end
      end
    end
    
    local function embark(vars)
      -- this is really hacky toward how you have it setup. 
      local loadedGroupName
      if troopIndex < #troops then
        troopIndex = troopIndex + 1
        loadedGroupName = troops[troopIndex]
      end
      if loadedGroupName then 
      	cargoLoaded[vars.unitName] = loadedGroupName
      else
        -- no more groups. Warning message or whatever
      end
    end
    
    for i = 1, #acTbl do
      missionCommands.addCommandForGroup(mist.DBs.humansByName[acTbl[i]].groupId, "Embark Troops", nil, embark, {unitName = acTbl[i]})
      missionCommands.addCommandForGroup(mist.DBs.humansByName[acTbl[i]].groupId, "Disembark Troops", nil, disembark, {unitName = acTbl[i]})
    end

     

    Thank you so much for your answer, it's like reading....well....a script for me so I don't understand it but I'm still grateful. I will see if I can implement it in my mission. Btw, what do you mean when you mention CTLD?

  3. Hi!

    I've now been at this for days as a beginner when it comes to scripts and I can't figure it out. 

    I have two UH-60L (mod) in a mission, one is cold and the other is hot, both are clients.

    As embarking troops in this mod does not seem to work (works fine with the Hueys) I'm trying to use a script to teleport the infantry group to the chopper. I've added radio items for both choppers so that you first spawn an infantry group and then you should be able to teleport that group with another radio item.

    For the Cold unit I have the following script and for the Hot one I've just replaced the word Cold with Hot. When inf group 1 has spawned a flag is activated so that both units can't spawn group 1 at the same time, it then moves to the next trigger for spawning group 2. The teleport trigger also has a flag that activates when a group has been teleported preventing both units trying to teleport the same group.

    mist.teleportToPoint({groupName='Green 1 Inf 1', point=Group.getByName('UH-60L Cold'):getUnit(1):getPosition().p, action='teleport', radius = 20, innerRadius = 10})

    This seems to work fine when I delete one of the units in the ME. If I delete the Cold one, there is no problem with teleporting to the Hot one and vice versa. I can jump in the Cold one as pilot and press the teleport radio call and nothing happens, if I then change my slot to the hot one the group can instantly teleport to that chopper without me ever pressing the radio item. This means that the script is looking for the Hot one even though the conditions for that trigger has not yet been met.

    Both scripts have seperate triggers and should only activate if the conditions are met for that trigger.

    I have been looking around to find an answer but I've not been able to and that is why I'm here right now.

    I'm adding two screenshots of both the Cold and the Hot trigger.

    This is surely a beginner mistake on my part and I would appreciate some assistance, it's driving me crazy.

    Digital Combat Simulator  Black Shark Screenshot 2022.12.07 - 17.14.26.18.png

    Digital Combat Simulator  Black Shark Screenshot 2022.12.07 - 17.14.37.60.png

    Cyprus Blue Day practice.miz

  4. On 4/30/2022 at 9:48 AM, ShaunX said:

    Strange one.

    Well for some reason, DCS doesn't seem to like the audio transmission file that RadioKAOS generated from your selection. I can't explain why as the file itself plays fine in any media player.

    To make the mission work and play the transmission, all I did was to use RadioKAOS to update your mission with an audio transmission I got it to generate from one of my own tracks.

    Please give this a try to confirm it works for you tooShauns KAOS test map_KAOS.miz

    Shauns KAOS test map_KAOS.miz 3.87 MB · 2 downloads

     

    Hi!

     

    I will try this, thanks!

  5. 10 hours ago, ShaunX said:

    Hi,

    Sorry you're having problems. I probably won't get a chance to look at this till next week I'm afraid.

    In the meantime, AM radio transmissions in DCS can be impacted by terrain as in reality (and I don't believe DCS allows for any ionospheric refraction). Can you check that your aircraft has a clear line of sight to the radio transmitter (which the app places near the centre of the terrain map - the transmission eminates from the centre of the KAOSzone at ground/sea level). No mountains/hills in the way ?

    If that's not it, please make a new simple KAOS mission with a single, small transmission file, them PM me the .miz file.

    Are you on the latest open beta ? I haven't had the chance to check it with recent updates so hoping they haven't affected it.

     

     

    Hello!

     

    "impacted by terrain"

    This was something I thought about as well, I therefor flew high up. And I have also put the aircraft right next to the trigger. Also, playing the file through the trigger menu should just play the file that has been chosen.

    "with a single, small transmission file"

    Tried this as well.

    "them PM me the .miz file."

    A mission with a single F-18 on Caucasus and a single track has been uploaded.

    "Are you on the latest open beta ?"

    Yes

     

    Have a nice weekend and thanks for the assistance!

    KAOS test map_KAOS.miz

  6. So now that I got the app working, I can't get any sound while in DCS. As you can see on the image, I've played the track for 19 seconds and there is no sound. Creating another mission without any triggers except the KAOS triggers still does not play any sound. The file works with VLC.

     

    Digital Combat Simulator  Black Shark Screenshot 2022.04.28 - 21.36.47.15.png

  7. Hi!

    I'm in need of some assistance. I'm getting the error message "Unable to Process Selected mission file - ". I have been successful in creating a KAOS copy of the mission once but as I wanted to update the mission, I deleted that copy and now I want to create a new one. This message is shown for every mission I try with. I've searched for a solution in the User Guide and on the forum, can't find anything.

    What I've tried.

    -Restarting the app.

    -Restarting the PC.

    -Disc cleaning in case some temp file is screwing things up.

    -Moving the mission file to another directory.

    -Making a change in the mission editor and saving.

    -Deleting the playlist and recreating.

    -Trying different MHz in case the error message was a generic one and the MHz wasn't supported.

    .........

     

    I just solved it while writing this. Might as well leave what I've already written as it might be used as a bug report.

    If you have this problem then I solved it by deleting everything in the Temp folder located in C:\Users\xxxxx\Documents\RadioKAOS\System\Temp.

     

     

     

    Have a lovely day!

     

    image.png

×
×
  • Create New...