Solano 176 Posted October 4, 2015 Hey, I am building my first mission and try to implement my own music / ambient sounds to my mission. I found a promising script but I can´t get it to work... Is it somehow outdated or am I just doing something wrong? Source: https://github.com/SPKcoding/SPK_RAS If anyone has a good hint how to do something like that or has a link to anything similar that would be much much appreciated. I couldn´t find much regarding this topic and what I found (link above) doesn´t seem to work... Basically I just want my music to act like in the DayZ Mod. It shall just occur from time to time Regards Share this post Link to post Share on other sites
Joe98 92 Posted October 4, 2015 There is one ambient sound that comes with the game. It can be accessed via the "effects" button in a trigger or in a waypoint. However I do not like the sound. My solution is to set up a few blueforce and opforce soldiers, vehicles and tanks and place them on the other side of a hill away from my action. Make them indestructible and provide unlimited ammunition. Then you get great sound effects tin the distance! . Share this post Link to post Share on other sites
Solano 176 Posted October 4, 2015 There is one ambient sound that comes with the game. It can be accessed via the "effects" button in a trigger or in a waypoint. However I do not like the sound. My solution is to set up a few blueforce and opforce soldiers, vehicles and tanks and place them on the other side of a hill away from my action. Make them indestructible and provide unlimited ammunition. Then you get great sound effects tin the distance! . Óh thats very clever - nice idea! I fear I was unclear tho. I mean more like ambient music that gets played every few minutes. Just like in good old DayZ for ArmA 2 you know? Share this post Link to post Share on other sites
Joe98 92 Posted October 4, 2015 I have no interest in DayZ, zombies or science fiction. . . Share this post Link to post Share on other sites
R3vo 2654 Posted October 4, 2015 (edited) My solution is to set up a few blueforce and opforce soldiers, vehicles and tanks and place them on the other side of a hill away from my action. And the next day you have a new thread about how poor the performance of the game is ;) You could try something like this: _musicPool = ["track1","track2","track3"]; //All the music defined in CfgMusic _randomFirstTrack = _musicPool call BIS_fnc_selectRandom; // select the initial track playMusic _randomFirstTrack;//play the initial track, required for the eventHandler to work addEventHandler ["MusicStop" //add an eventHandler which starts a new track when the music stops { _randomTrack = _musicPool call BIS_fnc_selectRandom; 0 fadeMusic 0; //set volume to 0 to smoothly fade in afterwards playMusic _randomTrack; //play a random selected track 10 fadeMusic 1; //Turn up the music volume smoothly }]; This is very basic and since it's already damn late here, also untested. In the end it should give you a idea what you can do, but of course it also depends on what you exactly want. Edited October 4, 2015 by R3vo 1 Share this post Link to post Share on other sites
Solano 176 Posted October 4, 2015 And the next day you have a new thread about how poor the performance of the game is ;) You could try something like this: _musicPool = ["track1","track2","track3"]; //All the music defined in CfgMusic _randomFirstTrack = _musicPool call BIS_fnc_selectRandom; // select the initial track playMusic _randomFirstTrack;//play the initial track, required for the eventHandler to work addEventHandler ["MusicStop" //add an eventHandler which starts a new track when the music stops { _randomTrack = _musicPool call BIS_fnc_selectRandom; 0 fadeMusic 0; //set volume to 0 to smoothly fade in afterwards playMusic _randomTrack; //play a random selected track 10 fadeMusic 1; //Turn up the music volume smoothly }]; This is very basic and since it's already damn late here, also untested. In the end it should give you a idea what you can do, but of course it also depends on what you exactly want. I thank you very much! I will try as far as I can get with that - since my scripting skills are not quite huge yet. Thanks for your effort! Just a little more description of what I would like to add to my mission (template). I made my own soundtrack and wanted to add it to my mission. It should be played randomly in order and randomly occur every x minutes or so... And I don´t know if this is a factor or not but it would be nice if everyone else on my server had the same music playing. It doesnt needs to be in perfect sync at all but the same music of course. Share this post Link to post Share on other sites
Persian MO 82 Posted October 5, 2015 Not good way but at least working init.sqf if (isServer) then { null=[]execVM "playmusic.sqf"; }; playmusic.sqf if !(isserver) exitWith {}; sleep 10; ["BackgroundTrack01_F","playmusic",true,false] call BIS_fnc_MP; // give enough sleep time until present music play over and wait for next music sleep 200; ["LeadTrack01c_F","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack03_F","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack05_F","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack01_F_Heli","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack02_F_EPC","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack01_F_EPA","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack04_F_EPC","playmusic",true,false] call BIS_fnc_MP; sleep 200; null=[]execVM "playmusic.sqf"; 1 Share this post Link to post Share on other sites
Solano 176 Posted October 5, 2015 Not good way but at least working init.sqf if (isServer) then { null=[]execVM "playmusic.sqf"; }; playmusic.sqf if !(isserver) exitWith {}; sleep 10; ["BackgroundTrack01_F","playmusic",true,false] call BIS_fnc_MP; // give enough sleep time until present music play over and wait for next music sleep 200; ["LeadTrack01c_F","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack03_F","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack05_F","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack01_F_Heli","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack02_F_EPC","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack01_F_EPA","playmusic",true,false] call BIS_fnc_MP; sleep 200; ["LeadTrack04_F_EPC","playmusic",true,false] call BIS_fnc_MP; sleep 200; null=[]execVM "playmusic.sqf"; Thanks to you too very much! I really appreciate all your effort! I am not able to create code like this myself - so I am very thankful for all your solutions! Share this post Link to post Share on other sites