Adding siren

Fox

Well-Known Member
Hi all !



Well i'm running my Servers on my end with DayZ CC 5.9.2.0 ,and we wanna add a custom sound file (siren) with a trigger on the editor .


Tried and failed using this tut : http://www.armaholic.com/page.php?id=12598 and using this just for adding a siren.

Next Thing is that he uses another or older version of the editor ,so i'm a bit confused .

cheers fox

editor :

Code:
mission.sqf (trigger)
 
_this = createTrigger ["EmptyDetector", [12124.479, 12707.27, -159]]; [U][I][B]is this 2d or 3d coordinate?[/B][/I][/U]
_this setTriggerArea [350, 350, 0, false];
_this setTriggerActivation ["ANY", "PRESENT", true];
_this setTriggerTimeout [2, 4, 6, false];
_this setTriggerStatements ["this", "playsound ""sirens""", ""];
Black Market = _this;
_trigger_2 = _this;[CODE]
 
[CODE]mission.sqm
 
class Item99
{
position[]={-18725.248,379.55328,25889.797};
azimut=-17.0839;
id=95;
side="WEST";
vehicle="Survivor1_DZ";
player="PLAY CDG";
skill=0.60000002;
init="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';";
};
};
};
class Item1 really dont know what this all is !!!!! FIGURED IT OUT WHAT IT IS AND ERASED IT !!!!
{
side="LOGIC";
class Vehicles
{
items=1;
class Item0
{
position[]={708.96582,35.858719,3533.1272};
id=50;
side="LOGIC";
vehicle="FunctionsManager";
leader=1;
lock="UNLOCKED";
skill=0.60000002;
};
};
};
};
 
description.txt
class CfgSounds
{
sounds[]={nam,eve,puk};
class nam
{
name = "Siren1";
sound[] = {\sound\SirenLoopMono.ogg, db-6, 1.0};
titles[] = {""};
};
class eve
{
name = "Siren2";
sound[] = {\sound\Sirens.ogg, db-6, 1.0};
titles[] = {""};
};
class puk
{
name = "Siren3";
sound[] = {\sound\Sirens2.ogg, db-6, 1.0};
titles[] = {""};
};
class playerSnoring
{
name="playerSnoring";
sound[]={\custom\sfx\snoring.ogg,0.9,1};
titles[] = {};
};
};
 
You should really use the code button on this text box, its the {}# icon, it will make codes much more legible. Just copy your code, and paste it in the insert box it provides, thanks.

Example:

Code:
_this = createTrigger ["EmptyDetector", [12124.479, 12707.27, -159]]; is this 2d or 3d coordinate?
_this setTriggerArea [350, 350, 0, false];
_this setTriggerActivation ["ANY", "PRESENT", true];
_this setTriggerTimeout [2, 4, 6, false];
_this setTriggerStatements ["this", "playsound ""sirens""", ""];
Black Market = _this;
_trigger_2 = _this;
 

Fox

Well-Known Member
//for teleport
Code:
[ your adminbase protection.script ]
 
sleep 10;
player setPos [2562.4578,10043.763,0.105];
};
// for adding siren
Code:
waitUntil {!isNull player};
playSound "siren";
sleep 5;
 
nonapsi_ef = ppEffectCreate ["colorCorrections", 1505];
nonapsi_ef ppEffectAdjust [2, 20, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
nonapsi_ef ppEffectCommit 0;
nonapsi_ef ppEffectAdjust [1, 0.6, -0.001, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
nonapsi_ef ppEffectCommit 3;
nonapsi_ef ppEffectEnable true;
nonapsi_ef2 = ppEffectCreate ["filmGrain", 1505];
nonapsi_ef2 ppEffectEnable true;
nonapsi_ef2 ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
nonapsi_ef2 ppEffectCommit 5;
sleep 8;
 
titleText ["Test!", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 5;
playSound "siren";
titleText ["Test", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 10;
r_player_inpain = true;
sleep 60;
r_player_cardiac = true;
sleep 60;
playSound "siren";
sleep 1;
r_player_injured = true;
sleep 60;
playSound "siren";
sleep 60;
playSound "siren";
sleep 1;
r_player_blood = 1500;
sleep 60;
r_player_dead = false;
get siren working mission.sqf
Code:
class Item5
        {
            position[]={xzy-coordinates};
            a=100;
            b=100;
            activationBy="ANY";
    type="SWITCH";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="siren";
            expCond="(vehicle player) in thislist;";
            expActiv="siren = [] execVM ""Scripts\siren.sqf"";";
            expDesactiv="terminate siren; titleText [""your message"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="your message to a player";
            };
        };
on your description.ext
Code:
class CfgSounds
{
    sounds[] = {siren};
 
    class siren
{
name = "siren";
sound[] = {\custom\sfx\siren.ogg,1.5,1};
titles[] = {""};
};
};
and u have to create the custom}\sfx\folder and put in an ogg file -like a siren ! lower the filedata as much as u can with audacity !
 
Top