Jump to content

[RELEASE] Welcome Messages v2.1 | Intro Music | Easy Config


Gr8

Recommended Posts

So i write this in my description.txt ?

 

  Quote

 

 

class CfgMusic
{
    tracks[]={};

    class Intro
    {
        name = "";
        sound[] = {"\sounds\intro.ogg", db+0, 1.0};
    };  
};

 

 

and where do i put the soundfiles to MPmissions or just in root ?

 

it doesnt work for me always getting the error "Sound file not found"

 

I have put them to root and mpmissions both times it didnt work out for me.

Link to comment
Share on other sites

This is a easy way of adding a Intro song

 

Create a folder in the PBO called music then add your song name it intro.ogg

 

Then in your init.sqf

playMusic "intro";

After doing that go into your description.ext Make sure its below class CfgRemoteExecCommands {};

class cfgMusic
{
   class intro
   {
        name = "intro";
        sound[] = {"music\intro.ogg", db+1,1}; 
    };
};
Link to comment
Share on other sites

  On 12/20/2014 at 12:31 PM, Tywin said:

ok i think i figured this out, but im getting kicked for script restriction 20, anyone know how to fix it? .. I have added the exceptions the same way op stated?

 

Open your scripts.log and find out what you are being kicked for. Add an exception to line 20 of scripts.txt.

Link to comment
Share on other sites

cfgMusic will sound depending on what the user Put their Music Level Settings to. Most of them have them all the way down,

cfgSound will be the best thing to do if you want all your client to listen to the amazing music you provide

Link to comment
Share on other sites

Hello,

 

I did a script almost identical for our server.

Here are corrections that i propose you :

 

 

Correction Line:

_size1 = 0.70; // size for each sub Credit
_color1 = "#FFFFFF"; // #FFFFFF is HTML Code. change it to whatever you want. make sure its a valid HTML code with # infront
By:

_size2 = 0.70; // size for each sub Credit
_color2 = "#FFFFFF"; // #FFFFFF is HTML Code. change it to whatever you want. make sure its a valid HTML code with # infront
 

 

 

Find Line:

sleep _Delay;
Add:

waitUntil {!isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])};
waitUntil {isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])};
sleep _Delay;
Enjoy ...
Link to comment
Share on other sites

You're welcome! but ...
 
The first "WaitUntil" wait that dialog "EPOCH_loadingScreen" is open
The second "WaitUntil" wait that dialog "EPOCH_loadingScreen" is closed
with only 1 "WaitUntil" this has no effect.
 
Progress script with 2 WaitUntil:

  Reveal hidden contents

- Launch script epoch


- Launch script welcome.sqf
- - First WaitUntil ... return (false) ... wait open "EPOCH_loadingScreen"
- player spawn & open dialog "EPOCH_loadingScreen" : First WaitUntil return true
- - Second WaitUntil ... return (false) ... wait close "EPOCH_loadingScreen"
- close dialog "EPOCH_loadingScreen" & Second WaitUntil return true
- - Sleep _Delay
- - Messages ...

 

Progress script with welcome.sqf actual:

  Reveal hidden contents

- Launch script epoch


- Launch script welcome.sqf
- - WaitUntil ... return (true) ... "EPOCH_loadingScreen" not yet open

- - Sleep _Delay
- player spawn & open dialog "EPOCH_loadingScreen" & Welcome Messages 1 (if _Delay is short)
- close dialog "EPOCH_loadingScreen" & Welcome Messages 2 (if _Delay is short)

- - Welcome Messages 3

Link to comment
Share on other sites

  On 12/21/2014 at 3:54 PM, L3uX said:

This code is dirty.

You can use such other methods to do this stuff and much cleaner code.

So post cleaner code and help the community, saying your way is better helps nobody :p

At least Gr8Boi took the time to post, it's helped others :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Advertisement
×
×
  • Create New...