Jump to content

Scifer

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by Scifer

  1. This seems to be the best alternative to me. Thank you so much!
  2. I'm making a MOOSE scripted mission. But as soon as I start shooting them, they end up stuck and inaccessible inside the buildings most of the time. The ideal solution for me would be to be able to simply move (not spawn) allied ground troops inside buildings like: unit:setPos(x, y, z) How can I achieve this?
  3. How to give AI infinite ammo through scripting API?
  4. I found it inside 'mission.miz\l10n\DEFAULT\dictionary': dictionary = { ["DictKey_descriptionNeutralsTask_4"] = "", ["DictKey_sortie_5"] = "", ["DictKey_descriptionText_1"] = "Description here!", ["DictKey_descriptionBlueTask_3"] = "", ["DictKey_descriptionRedTask_2"] = "", } -- end of dictionary This function can read individual keys from this dictionary. But how to write to this dictionary?
  5. @trama1983 Your Google Drive links in that document are all broken. Could you please supply those files otherwise? Thank you so much!
  6. Wikipedia says cruise speed and altitude are 354 kn and 30,003 ft respectively. But a fire started at 14,000 ft for me, even if temperature was bellow 832º. https://en.wikipedia.org/wiki/CASA_C-101_Aviojet#Specifications_(CASA_C-101CC) What may have caused the fire? What are ideal cruise height and speed?
  7. I implemented this function without the need to include any additional units with MOOSE Framework. 1. Generate a Morse code like TKR at https://morsecode.world/international/translator.html Pitch: 400 Character speed: 10 Farnsworth speed: 10 2. Edit the audio file to include pause by extending its duration to 10 seconds 3. In ME create a trigger SOUND TO COUNTRY (Ukraine, morse.wav) 4. Name the LHA "USS Tarawa" in the ME 5. Follow the standard procedure for MOOSE to execute the following code: carrier_unit = UNIT:FindByName( 'USS Tarawa' ) -- Carrier NDB local CarrierBeacon = carrier_unit:GetBeacon() local frequency = 0.42 -- in MHz local modulation = radio.modulation.AM local power = 100 -- Standard for VOR local file = 'morse.wav' -- Dots and Dashes: - -.- .-. CarrierBeacon:RadioBeacon( file, frequency, modulation, power )
  8. Thank you so much for your answer! But I was curious. How would you spawn exactly the same units and in the same position?
  9. I am trying to find a way to resupply units with MOOSE scripting. The idea is that an airborne infantry would land at an LZ and when it arrives at its destination, the infantry groups and a mortar there would be resupplied. I just need to know if there is any function to resupply these units.
  10. Thank you so much. However a second problem came up.
  11. I'm trying to save a table to a file, just to analyze it. Path = 'd:\\' Filename = 'table.lua' Data = table UTILS.SaveToFile(Path, Filename, Data) However I get the following log message: I believe the path has to be de-sanitized. But how?
  12. I want to start a mission on air or ground at random position, altitude and heading. How can I spawn a non-AI unit like player/client using MOOSE?
  13. Now it is working like a charm. Thank so much!
  14. I am adding custom beacons to Syria and succeeding until the point where ILS is not working (tested with Huey only). Here is what I did in beacons.lua (file attached): -- Custom Beacons { display_name = _('Rayak'); beaconId = 'airfield51_0'; type = BEACON_TYPE_VOR_DME; callsign = 'RAY'; frequency = 107000000.000000; position = { -130181.8125, 909.15051269531, 4097.2592773438 }; direction = 0.000000; positionGeo = { latitude = 33.850690831138, longitude = 35.98781336668 }; sceneObjects = {'t:99550262'}; }; { display_name = _('Rayak'); beaconId = 'airfield51_1'; type = BEACON_TYPE_AIRPORT_HOMER_WITH_MARKER; callsign = 'RAK'; frequency = 350100.000000; position = { -131681.046875, 888.30596923828, 2396.8859863281 }; direction = 227.000000; positionGeo = { latitude = 33.836737715793, longitude = 35.969935539154 }; sceneObjects = {'t:522781717'}; }; { display_name = _('Rayak'); beaconId = 'airfield51_2'; type = BEACON_TYPE_AIRPORT_HOMER_WITH_MARKER; callsign = 'RYK'; frequency = 350200.000000; position = { -134789, 871.50836181641, -936.03497314453 }; direction = 227.000000; positionGeo = { latitude = 33.807856734319, longitude = 35.934964382606 }; sceneObjects = {'t:522781717'}; }; { display_name = _(''); beaconId = 'airfield51_3'; type = BEACON_TYPE_ILS_LOCALIZER; callsign = 'YAK'; frequency = 107100000.000000; position = { -131166.578125, 892.31683349609, 2948.5236816406 }; direction = 227.000000; positionGeo = { latitude = 32.677190, longitude = 35.175056 }; sceneObjects = {'t:201097390'}; chartOffsetX = 0; }; { display_name = _(''); beaconId = 'airfield51_4'; type = BEACON_TYPE_ILS_GLIDESLOPE; callsign = 'YAK'; frequency = 107100000.000000; position = { -131166.578125, 892.31683349609, 2948.5236816406 }; direction = 227.000000; positionGeo = { latitude = 32.677190, longitude = 35.175056 }; sceneObjects = {'t:201097390'}; chartOffsetX = 0; }; } Can anyone tell me why ILS is not working? Also: What is the difference between position and positionGeo? What sceneObjects stands for? beacons.lua
  15. Is it possible to make a mod to insert beacons on maps? How do you do that?
  16. I placed a Huey and a zone in ME where a slingload object is spawned via script as follows: -- Spawn cargo local cargo_template = { type = 'uh1h_cargo', mass = 900, } local cargo_zone = ZONE:New( 'Cargo Zone' ) local cargo_static = SPAWNSTATIC :NewFromTemplate( cargo_template, country.id.USA ) :SpawnFromZone( cargo_zone, 0, 'Slingload' ) The problem is the F6 menu item doesn't appear. So I cannot activate the slingload native functions like hook, indicator and smoke. How can I slingload script spawned static objects?
  17. After updating MOOSE, I came across an even better way – NewFromTemplate() – and finally managed to spawn random cargos: local cargo_table = { { type = 'ammo_cargo', mass = 1000, }, { type = "barrels_cargo", mass = 480, }, { type = 'm117_cargo', mass = 840, }, } local cargo_template = cargo_table[math.random(#cargo_table)] local cargo_zone = ZONE:New( 'Cargo Zone' ) local cargo_static = SPAWNSTATIC :NewFromTemplate( cargo_template, country.id.USA ) :SpawnFromZone( cargo_zone, 0, 'Cargo' ) :thumbup: Thanks everyone for your support!
  18. Thanks for your suggestion but I don't want to manually place each static type in ME.
  19. Thanks for noticing but I got exactly the same error after correcting this.
  20. I'm trying to spawn random slingloadable crates from a table. The problem is I didn't manage to use NewFromType() properly. I even tried to obtain type and category with GetTypeName() and GetCategoryName() – from a ME crate – to no avail :( local crate_zone = ZONE:New( 'Crate Zone' ) -- Just to certify type and category are correct local crate = STATIC:FindByName( 'Crate' ) local type = crate:GetTypeName() local category crate:GetCategoryName() -- EDIT: missing '=' local crate_static = SPAWNSTATIC :NewFromType( type, category, country.id.USA ) :SpawnFromZone( crate_zone ) I got the following error: ERROR SCRIPTING: Mission script error: [string "C:\Users\Scifer\AppData\Local\Temp\DCS.openbeta\/~mis0000458A.lua"]:11008: attempt to index field '?' (a nil value) stack traceback: [C]: ? [string "C:\Users\Scifer\AppData\Local\Temp\DCS.openbeta\/~mis0000458A.lua"]:11008: in function 'GetStaticGroupTemplate' [string "C:\Users\Scifer\AppData\Local\Temp\DCS.openbeta\/~mis0000458A.lua"]:24791: in function 'SpawnFromPointVec2' [string "C:\Users\Scifer\AppData\Local\Temp\DCS.openbeta\/~mis0000458A.lua"]:24880: in function 'SpawnFromZone' [string "C:\Users\Scifer\AppData\Local\Temp\DCS.openbeta\/~mis00004726.lua"]:10: in main chunk What am I doing wrong?
  21. Is this a module or anti-virus problem?
  22. Problem Solved Perfect! Indeed Avira anti-virus is blocking C101FM.dll. Thank you so much!
×
×
  • Create New...