Jump to content
  • 0

Custom music based on player location


therisingdead

Question

4 answers to this question

Recommended Posts

  • 0

as far as i know you can create a sound source with the editor, if it works idk.

 

but you also can do it with sensors,

 

like this:

class Item8
		{
			position[]={1782.72,158.85699,2870.71};
			activationBy="ANY";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonekamenka_musiczone";
			expCond="(player distance zonekamenka_musiczone) < 100;";
			expActiv="playmusicin= true;";
			expDesactiv="playmusicin = false;";
			class Effects
			{
				
			};
        };

Then in variables.sqf 

 

at the top add this:

playmusicin = false;

then in your init.sqf in the if (!isDedicated) then { section execute a script with this in it:

if(playmusicin) then {
playSound "YOURMUSICNAMEHERE";
};


idk if it work, only an idea dont test it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...