Jump to content
tony86

How to loop the sound in trigger

Recommended Posts

Hello!

I have a problem with sound loop in trigger

description.ext

class CfgSounds
{
sounds[]={};
class music1
{
name = "music1";
sound[] = {"\sounds\test.ogg", 300, 1};
titles[] = {0,""};
};
};

The trigger:

Name of trigger - w1

Type - Skip Waypoint
Activation - Game Logic
Activation Type - Not Present
Repeatable - Enable

Condition - This
On Act - w1 say3D ["music1", 250, 1];

The sound play well, but one time, I would like it to play in a loop.

Thanks in advance for your help and suggestions!

Share this post


Link to post
Share on other sites

Have not tested it with a sound, only with music a while back, but when repeatable is on and there is no sleep (length of sound) to the trigger it is a question how it works in the first place. Oh and if willing its easy to do this via a script.

 

EDIT: and when using not present I prefer using a faction that is not present in the mission. Just to be sure it works 👍

Share this post


Link to post
Share on other sites

I'm sorry but I care about hearing the sound space. Loud in the center and smooth pass hear sound to silence, this is guaranteed by the say3D option. This option only works with sounds (cfgsounds), when I added cfgmusic, it doesn't see this file and can't play it.

 

I also tried with something like that (in trigger on act):

nul = [thisTrigger] spawn {while {true} do {(_this select 0) say3D "music1"; sleep 10;};};

 

The sound is repeats but is quieter than the first time. I think additional parameters are missing there. The sound repeats, but no additional settings (such as volume, sound propagation), which makes the sound default state and different from the first one with the additional settings parameters. I dont know how to set the volume parameters to be the same and the sound to be as loud as the first time 😕

Share this post


Link to post
Share on other sites

Launch via  .sqf        17 is length of the sound in seconds.

nul = [yourobjectvarname] spawn {while {true} do {(_this select 0) say3D "yoursound"; sleep 17;};};
sleep 1000;
  • Like 2

Share this post


Link to post
Share on other sites

Yeah then music will not work. Just in case you need it any other time the music part is found by double clicking on the trigger and there is a submenu towards the end which has a music tab. Open the tab find the name of the song and all good. For a sound the above should work. In general I rarelly use the say3d because the same track as a sound plays in a much lower volume that if i include it as music. Really strange. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×