FlightControl-Master / MOOSE

Mission Object Oriented Scripting Environment (MOOSE) for lua mission scripting design in DCS World
http://flightcontrol-master.github.io/MOOSE/
GNU General Public License v3.0
290 stars 95 forks source link

USERSOUND is not working, while trigger.action.outSound is ok. #2037

Closed Amarok73 closed 10 months ago

Amarok73 commented 10 months ago

Hello,

I'd like to report problem with playing the sound using the USERSOUND class. The script from miz file is Chicken_Random_Routes.lua. These OGG files triggered with ME defined triggers by the fApplause[1-5] flags set works ok, while using Applause[1-5]:ToAll() has no effect at all. No sound, no error message in the log. I've tried also the trigger.action.outSound("beacon.ogg") that is the command from the USERSOUND:ToAll() method and this one works correctly. All the sound files are cached from wihtin the ME triggers by playing them to the "dummy" country. Chicken Run - Dubai Hastle.miz.zip

Applevangelist commented 10 months ago

A simple test with USERSOUND works as it should. Likely your script?

Applevangelist commented 10 months ago

Lua is CaseSenSitIVe. OGG is not equal to ogg.

local Applause = {}
    Applause[1] = USERSOUND:New("1.ogg")
    Applause[2] = USERSOUND:New("2.ogg")
    Applause[3] = USERSOUND:New("3.ogg")
    Applause[4] = USERSOUND:New("4.ogg")
    Applause[5] = USERSOUND:New("5.ogg")
    SndBeacon = USERSOUND:New("beacon.ogg")

USERSOUND has no queue btw, so all you hear is the beacon

Amarok73 commented 10 months ago

Indeed, the file names are also case sensitive. Thanks for the help!