Jump to content
  • 0

sound trigger ?


meanbeandk

Question

3 answers to this question

Recommended Posts

  • 0

stuck here :(

have 2 files to create music in stary trader

1. file music

// Trader City Stary
_this = createTrigger ["EmptyDetector", [6325.6772, 7807.7412, 0]];
_this setTriggerArea [150, 150, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post1) < 100;", "music = true; canbuild = false;", "music = false; canbuild = true;"];
trading_post1 = _this;
_trigger_0 = _this;

2. file musictrikker

if (isNil "music") then {
music = false;
};

while {true} do {
waitUntil { music };
titleText [format["Welcome to my Disco "],"PLAIN DOWN"]; titleFadeOut 4;
playsound "song";
sleep 60; 
}; 

in my description i have

class CfgSounds
{
    sounds[] = {siren};
    class siren
    {
	name = "siren";
	sound[] = {Scripts\sirens\siren.ogg,0.5,1};
	titles[] = {};
    };
	
};

and shall add

class CfgSounds
{
    sounds[] =
    {
    Song
    };
    class Song
    {
    name="Song";
    sound[]={Song.ogg,0.9,1};
    titles[] = {};
    };
};

but dont know how

 

in my init.sqf i have

[] execVM "music\musictri.sqf";
[] execVM "music\music.sqf";

Link to comment
Share on other sites

  • 0

Got it to work

 

in my init.sqf i have addet

[] execVM "music\config.sqf";

My music\config.sqf

[] execVM "music\musictri.sqf";
[] execVM "music\music.sqf";

And my music\musictri.sqf

_this = createTrigger ["EmptyDetector", [12733.6,12360.7,1]]; // cords for the trikker
_this setTriggerArea [15, 15, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post1) < 15;", "music = true; canbuild = false;", "music = false; canbuild = true;"];
trading_post1 = _this;
_trigger_0 = _this;

and my music\music.sqf

if (isNil "music") then {
music = false;
};

while {true} do {
waitUntil { music };
titleText [format["Text massage"],"PLAIN DOWN"]; titleFadeOut 4;
playsound "song";
sleep 20;
 
}; 

in my description.sqf

class CfgSounds
{
    sounds[] = 
	{
		siren, song
	};
    
	class siren
    {
	name = "siren";
	sound[] = {Scripts\sirens\siren.ogg,0.5,1};
	titles[] = {};
    };
	
	class Song
    {
    name="Song";
    sound[]={Song.ogg,0.9,1};
    titles[] = {};
    };
	
	};

if only music. If you don't have added sirens for the cop cars

class CfgSounds
{
    sounds[] =
    {
    Song
    };
    class Song
    {
    name="Song";
    sound[]={Song.ogg,0.9,1};
    titles[] = {};
    };
};

Hope i can help someone else whith this
:) :) :)

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...