Jump to content

Recommended Posts

Posted

I am working on creating a mission which uses a lot of playing, stopping and looping sounds, and am having lots of problems getting the audio to play consistently.  Small demo mission attached, which reproduces one of the problems.

The script is supposed to play an .ogg file through trigger.action.radioTransmission for 10 seconds, then stop it for 10 seconds, then restart playing it again; repeat ad infinitum.  However, the audio stops being played after 1 minute (which, perhaps not coincidentally, is the actual length of the .ogg file).

local location = trigger.misc.getZone('Radio').point

function stop(dummy, when)
  trigger.action.outText('Stop' , 10 , true)
  trigger.action.stopRadioTransmission('radio')
  return nil
end

function play(dummy, time_now)
  trigger.action.outText('Play' , 10 , true)
  trigger.action.radioTransmission('l10n/DEFAULT/Poacher.ogg', location, 0, false, 127500000, 50, 'radio')
  timer.scheduleFunction(stop, nil, timer.getTime()+10)
  return time_now + 20
end

timer.scheduleFunction(play, nil, timer.getTime()+10)

Video showing the problem here: 

You can see that the "Play" and "Stop" messages keep being displayed, but the radio audio stops working after 1 minute.

Tested and reproducible in the Mi-8 and MiG-21.

RadioRepeatBug.miz dcs.radio-repeat-bug.log RadioRepeatBug.trk

  • Thanks 1
  • 2 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...