Jump to content

How to repeatedly play a sound file every 10 seconds.


_Defi
Go to solution Solved by Rudel_chw,

Recommended Posts

I am trying to trigger playing a sound file repeatedly.

When I set

Repetitive Action -> Unit inside Zone -> SOUNT TO ALL (play wav file) 

it just keeps playing the wav file directly without sufficient gap between constantly almost all together at once (around 1s lag). Which is obviously wrong.

When I try to set

Repetitive Action -> Unit Inside Zone + TIME SINCE FLAG1 = 25 -> SOUND TO ALL + SET FLAG1 VALUE =10

it doesn't work as expected. I would think it counts how much time has passed since Flag was last set. And if it's been more than 25secs it should play it again. But nothing happens. 

Initially I have set a FLAG1 value =0 after 3secs into mission to trigger the Repetitive Action.

What is the easiest way to play a sound file repetitively when Unit inside a zone?

Link to comment
Share on other sites

  • Solution
45 minutes ago, _Defi said:

I am trying to trigger playing a sound file repeatedly.

When I set

Repetitive Action -> Unit inside Zone -> SOUNT TO ALL (play wav file) 

it just keeps playing the wav file directly without sufficient gap between constantly almost all together at once (around 1s lag). Which is obviously wrong.

 

Not wrong, the trigger engine of DCS processes the trigger list every one second, it just did what you instructed it to.

 

45 minutes ago, _Defi said:

When I try to set

Repetitive Action -> Unit Inside Zone + TIME SINCE FLAG1 = 25 -> SOUND TO ALL + SET FLAG1 VALUE =10

it doesn't work as expected. I would think it counts how much time has passed since Flag was last set. And if it's been more than 25secs it should play it again. But nothing happens. 

Initially I have set a FLAG1 value =0 after 3secs into mission to trigger the Repetitive Action.

 

You need to employ SWITCHED CONDITION instead of REPETITIVE ACTION. This way it will only be executed when the condition becames true again, like this:

 

F8eaJZy.jpg

 

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

51 minutes ago, Rudel_chw said:

 

Not wrong, the trigger engine of DCS processes the trigger list every one second, it just did what you instructed it to.

 

 

You need to employ SWITCHED CONDITION instead of REPETITIVE ACTION. This way it will only be executed when the condition becames true again, like this:

 

F8eaJZy.jpg

 

 

Oh does it need that OFF and ON to be able to trigger the 'switched condition' ?  Or is SET FLAG VALUE = 10 also working? 
Because I got the REPETITIVE ACTIOn to WORK with TIME SINCE FLAG and SET FLAG VALUE at the same time.
BUT I needed to wait 2 Minutes before it even started playing in the first place! This is why initially I thought it wasn't working!
THANKS!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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