Jump to content
cb65

MP intro problem need help

Recommended Posts

Hi, 

I have a small problem with my intro.

I run it from the initPlayerLocal.sqf and it works perfectly on both server/host and client sides except for the intro music, it plays fine for the host side but not the client side.

The code I'm using to run the intro music is :

// Create intro music trigger
intro_trigger = createTrigger ["EmptyDetector",position player,false];
intro_trigger setTriggerArea [0,0,0,true];
intro_trigger setTriggerActivation ["NONE","PRESENT",false];
intro_trigger setTriggerTimeout [0,0,0,true];
intro_trigger setTriggerStatements ["intro_track","",""];
intro_trigger setMusicEffect "introtrack";

If anyone can put me on the right path id appreciate the help.

 

cb65.

Share this post


Link to post
Share on other sites

Try and add this to the top of initPlayerLocal.sqf

params ["_player", "_didJIP"];

and replace createTrigger line with this:

intro_trigger = createTrigger ["EmptyDetector",position _player,false];

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Another way to trigger music in a mission is to put this code into a description.ext

class cfgMusic
{
    tracks[]={song1};
    
    class track1
    {
        name="song1";
        sound[] = {\music\song1.ogg, db+10, 1.0};
    };
};

Song1 there is the name of the file for the music, can be anything.

In the mission folder have a folder titled music, inside that the file for the music, must be in .ogg format

        Then ingame, in a trigger, setup the trigger to encompass the area you are going to start, set the trigger to any player present.

 

In the On activation box put playmusic "track1";

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for the response I'll try all those options tonight.

 

cb65.

Share this post


Link to post
Share on other sites
On 6/19/2022 at 3:17 PM, Gunter Severloh said:

Another way to trigger music in a mission is to put this code into a description.ext


class cfgMusic
{
    tracks[]={song1};
    
    class track1
    {
        name="song1";
        sound[] = {\music\song1.ogg, db+10, 1.0};
    };
};

Song1 there is the name of the file for the music, can be anything.

In the mission folder have a folder titled music, inside that the file for the music, must be in .ogg format

        Then ingame, in a trigger, setup the trigger to encompass the area you are going to start, set the trigger to any player present.

 

In the On activation box put playmusic "track1";

 

How will this way go with JIP players ?

Share this post


Link to post
Share on other sites

Sorry guys i found out what the problem was, my idiot mate didn't realize till i asked him to check he had his music turned off in his settings.

So sorry for that and thanks again for all your suggestions.

 

cb65.

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, cb65 said:

How will this way go with JIP players ?

With the trigger, the player spawning in after the music has played will play for the new player.

The trigger will determine when the music is played, i basically set the trigger as any player present, and play once, so

after i spawned in and went on, and my friend came in he heard the music on his end.

   Its just a normal area trigger, when a player is present the music plays, set it to once or repeatedly up to you.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks Gunter Severloh I appreciate it mate.

  • Like 1

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

×