Jump to content
  • 0

Scary Forest - how to?


dkmo

Question

Hello,

 

I have a question. I want to play a Soundfile, when a Player enters Devils Castle. I tried to place a Trigger and added a Sound to a Folder - this worked; When the Player entered Devils Castle you could hear the Music. I wanted to do this to the Server, so I "manipulated" the Servers description.ext:

 

class CfgSounds
{
    sounds[] =
    {
    playerSnoring,horror,gangnamstyle,nam,eve,puk
    };
    class playerSnoring
    {
    name="playerSnoring";
    sound[]={\fixes\sounds\snoring.ogg,0.9,1};
    titles[] = {};
    };
    class gangnamstyle
    {
    name="gangnamstyle";
    sound[]={\fixes\sounds\gangnamstyle.ogg,0.9,1};
    titles[] = {};
    };

class horror
{
name = "horror"; // Name for mission editor
sound[] = {\sound\horror.ogg, 1, 1.0};
titles[] = { };
};
    class nam
    {
    name = "Siren1";
    sound[] = {\fixes\sounds\SirenLoopMono.ogg, db+5, 1.0};
    titles[] = {""};
    };
    class eve
    {
        name = "Siren2";
        sound[] = {\fixes\sounds\Sirens.ogg, db+5, 1.0};
        titles[] = {""};
    };
    class puk
    {
        name = "Siren3";
        sound[] = {\fixes\sounds\Sirens2.ogg, db+5, 1.0};
        titles[] = {""};
    };

saved everything, created the pbo File but nothing happens when I enter the Triggerzone. In the init.sqf I added:
 

[] execVM "Scripts\trigger.sqf";

and my "trigger.sqf" looks like this:


if (isServer) then {
_this = createTrigger ["EmptyDetector", [6943.8145, 11396.088]];
_this setTriggerArea [900, 1500, -17.338356, false];
_this setTriggerActivation ["ANY", "PRESENT", true];
_this setTriggerStatements ["this", "playSound ""horror"";", ""];
_trigger_0 = _this;
};
}

where is the fault? (Sry 4 my english skills)

 

Hope u can help me.

 

 

 

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Should it be a zone to enter or a random spot?

 

You mentioned a triggerzone and you should better do it with a function in fn_selfactions, just with a playercounter, cuz serverside playing sounds could be tricky as far as I remeber

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