Vantskruv Posted January 16, 2021 Posted January 16, 2021 I have test script looking like this: p = trigger.misc.getZone('TriggerZoneFM').point Freq = 35 --Mhz Freq = Freq * 1000000 --Hz Power = 100 --W trigger.action.outText("Hello World! Testing output text to everyone! End Transmission. Sound should follow but will not.. :(", 10) trigger.action.radioTransmission('morse_code.ogg', p, radio.modulation.FM, true, Freq, Power) -- trigger.action.outSound('morse_code.ogg') I am unable to get the sound to work in the FM radio (Huey). Even tested other frequencies fitting for the UHF radio, and other frequencies fitting with AM-modulation for the NAV and VHF radios. Though, the sound outputs when calling the outSound function (so the sound file is found by the script). It works though if I do not add the radioTransmission via LUA, but via the inbuilt functions in the mission-editor, but that is something I do not want. I am not sure what is wrong... am I missing something?
toutenglisse Posted January 16, 2021 Posted January 16, 2021 Here a working exemple with this scripted function (Caucasus map - F16c cockpit - at 2 seconds the radio transmission plays sound through default 127Mhz AM of COMM2) My guess : 'morse-code.ogg' -> 'l10n/DEFAULT/morse-code.ogg' , load sound in a trigger with an unused flag condition to be sure it's placed right in miz file. And a doubt about frequency as in function exemple it is said 9 digits required (35Mhz is 8 digit and it's not valid for F16c radio so I have not tested in my exemple - but IDK the matter of "9 digits required"). test-radio.miz
Vantskruv Posted January 16, 2021 Author Posted January 16, 2021 (edited) I do not see any script files in your miz-file.... so I cannot see your example. Also, I have already made a flag condition to keep the sound file in the miz-file. Edit: As I wrote before, the outSound command perfectly works fine with the path 'morse_code.ogg' (it even does not work with the path added to the script), but I have already tested the full path, with both slashes \ and / without any success. Edited January 16, 2021 by Vantskruv
toutenglisse Posted January 16, 2021 Posted January 16, 2021 (edited) script is in the "do script" action of first trigger. edit : I don't own the Huey so I can't give you an answer with your exact need sorry. (I adapted to AM radio of F16c) Edited January 16, 2021 by toutenglisse in post 1
Vantskruv Posted January 16, 2021 Author Posted January 16, 2021 @toutenglisse Thanks so much, I got it working. I misinterpreted a file called morse_code_.ogg, instead of the morse_code.ogg.
Recommended Posts