Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Recommended Posts

Hello,

I am trying to add custom music to a spawned helicopter.  I was successful in making a mission where the helicopter is already there in the mission and I was able to add the scripts to the Init. How can I spawn vehicles with custom sounds in the action menu?

Thank you for any help. 

Share this post


Link to post
Share on other sites

Investigate this, https://community.bistudio.com/wiki/addAction 

 

example:   

player AddAction ["<t color=""#4DB0E2"">" +"pinkfloyd", "music.sqf"];   -  in the init.sqf

"code you already using in vehicle init (I suppose), but instead of "this", put unit name, let's say "heli_1"   -    music.sqf

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Wow! That worked like a charm. Thank you I ended up using this in the init in a specific chopper rather than adding it to each chopper that can be spawned.

Example Vehichle init:
h1 addAction [ 'SystemOfADown-War', {
h1 say3D ["song1", 1000,1];
} ];
-----------------------------------------------------------------------
Sound.hpp:

-----------------------------------------------------------------------
 class SystemOfADownWar
{
name = "SystemOfADownWar";
sound[] = { "Rsc\Sounds\SystemOfADown-War.ogg", 5, 1, 1000 };
titles[] = { 1, "SystemOfADown-War" };
};
}

--------------------------------------------------------------------------

.ogg file added to the sound directory 

 

Thank you for all your help and such a fast response! Cheers.

  • Like 1

Share this post


Link to post
Share on other sites

Very glad it helped! Cheers bro, enjoy!

Share this post


Link to post
Share on other sites

×