Jump to content
Oscah

Need some assistance regarding CFGSounds & CFGRadio...

Recommended Posts

Hello all,

 

I'm having a bit of an issue and a fair few scripting woes at the moment and to be honest I have no idea what I'm doing wrong. 

I'm trying to make a mission where the players pick up an items, it disappears and then CFGradio kicks in. (The picking up is fine, I've sorted that.)

The problem comes when I tell this trigger to activate my script, which has the following lines in;

 

Iglov1 sideRadio "mes1";

Iowa1 sideRadio "mes2";

 

(Both units are named as such in game.)

This fires up my script which has the Radio play sound for each of the dialog. The problem comes when sometimes one sound plays and both radio messages activate at the same time, I've tried using (SLEEP 12;) to no effect, it throws up errors everytime I try, what I NEED it to do is play one sound for one radio message and then another sound for another radio message a couple of seconds after. (TLDR, the sounds do play occasionally, the radios actually come on screen. Just both at the same time and sometimes it's only one sound rather than two.)

 

Here is my CFGradio file;

 

class CfgRadio
{
  sounds[] = {mes1,mes2};

  class mes1
  {
    name = "mes1";
    sound[] = {"SS\mes1.ogg", db+0, 1.0};
    title = "What the **** is going on! Iowa?, Iowa we require the choppers here, choppers here now please... I can see them! We've got 20 boys down here, tell them to get over here.";    
  };

  class mes2
  {
    name = "mes2";
    sound[] = {"SS\mes2.ogg", db+0, 1.0};
    title = "They can hear you Igla... Go-on tell them what you think of them, it'll change squat. We cannot move these for your boys. I'll see where column is. Stand-by.";    
  };
  };

 

Second Query - 

 

Is it possible to use both CFGSound and CFGradio? I'm looking at putting a scream a few seconds after the players have picked up the items and both radio messages have played, should I use CFGradio for this? Or should I use sound?

 

Please help me oh merciful community, I'm tearing my hair out trying to figure this one out.  

  • Like 1

Share this post


Link to post
Share on other sites

In a trigger, you need to spawn your code for pause:

0 = [] spawn {

Iglov1 sideRadio "mes1";

sleep 12;

Iowa1 sideRadio "mes2";

};

 

cfgRadio cfSound cfgMusic... see some differences here.

Share this post


Link to post
Share on other sites

Just confirming, is this in the script menu?

I've entered in your suggestion and the game is still throwing up "Generic Expression in..." and sometimes the mission is still playing both at the same time?

 

Share this post


Link to post
Share on other sites
29 minutes ago, Oscah said:

Just confirming, is this in the script menu?

 

I think he means in the trigger Activation.

Share this post


Link to post
Share on other sites
4 hours ago, major-stiffy said:

 

I think he means in the trigger Activation.

yep

Share this post


Link to post
Share on other sites

Thanks guys, it's starting to fire in sequence. Only problem I'm having now is that is it duplicating the same speech line and sound twice before firing the next. 
 

This is my trigger;

[this] exec "RadioWarning.sqf", 0 = [] spawn { 
Iglov1 sideRadio "mes1";
sleep 12; 
Iowa1 sideRadio "mes2"; 
};

 

(If I take out the exec "radiowarning" the side radio works fine, but no sound is played.)

 

Share this post


Link to post
Share on other sites
2 hours ago, pierremgi said:

How many players?

7-8 Players Maximum. 

Share this post


Link to post
Share on other sites

[this] exec "RadioWarning.sqf"

 

Test this:

Make your trigger server only and, in "activation" field:

 

0 = [] spawn { 
[Iglov1, "mes1"] remoteExec ["sideRadio"];
sleep 12; 
[Iowa1, "mes2"] remoteExec ["sideRadio"]; 
};

Share this post


Link to post
Share on other sites

That worked!

Will this play for everyone in the game? we don't usually play via server at the moment.

 

Say if I wanted to play a normal CFGsound after with no radio chat. Could I just add on a CFGsounds line to the bottom of the radio script? 

Share this post


Link to post
Share on other sites
1 hour ago, Oscah said:

Could I just add on a CFGsounds line to the bottom of the radio script? 

 

Don't see why not.

Share this post


Link to post
Share on other sites

Hi all, Another problem, I'm trying to get all the sounds to play, I've added CFGSound to this line of code and now I cannot get anything to fire. Can anyone see the problem with this code? class CfgRadio { sounds[] = {mes1,mes2}; class mes1 { name = "mes1"; sound[] = {"SS\mes1.ogg", db+0, 1.0}; title = "What the fuck is going on! Iowa?, Iowa we require the choppers here, choppers here now please... I can see them! We've got 20 boys down here, tell them to get over here."; }; class mes2 { name = "mes2"; sound[] = {"SS\mes2.ogg", db+0, 1.0}; title = "They can hear you Igla... Go-on tell them what you think of them, it'll change squat. We cannot move these for your boys. I'll see where column is. Stand-by."; }; class CfgSounds { sounds[] = {Monster1}; class Monster1 { name = "Monster1"; sound[] = {"SS\Monster1.ogg", db+20, 1, 1}; titles[] = {""}; }; };

Share this post


Link to post
Share on other sites

Hi all, Here is the screenshot https://puu.sh/BBsQ7/8e5eabfa58.png

Share this post


Link to post
Share on other sites

Missing  };  at the end of class CFGRadio.

 

Also study the code I linked above for syntax.

Share this post


Link to post
Share on other sites

Thanks all, I've got it working thanks to the help here. :)

 

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

×