Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
any news on using inbuilt sounds with this scripts? If not, does anyone have any smaller audio files?
//sounds
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[] = {""};
};
};
// sounds
class CfgSounds
{
sounds[] = {};
class playerSnoring
{
name="playerSnoring";
sound[]={sfx\snoring.ogg,0.9,1};
titles[] = {};
};
};
// sounds
class CfgSounds
{
sounds[]={nam,eve,puk,playerSnoring};
class nam
{
name = "Siren1";
sound[] = {\sfx\SirenLoopMono.ogg, db-6, 1.0};
titles[] = {""};
};
class eve
{
name = "Siren2";
sound[] = {\sfx\Sirens.ogg, db-6, 1.0};
titles[] = {""};
};
class puk
{
name = "Siren3";
sound[] = {\sfx\Sirens2.ogg, db-6, 1.0};
titles[] = {""};
};
class playerSnoring
{
name="playerSnoring";
sound[]={sfx\snoring.ogg,0.9,1};
titles[] = {};
};
};
// sounds
class CfgSounds
{
sounds[]={nam,eve,puk,playerSnoring};
class nam
{
name = "Siren1";
sound[] = {\sfx\SirenLoopMono.ogg, db-6, 1.0};
titles[] = {""};
};
class eve
{
name = "Siren2";
sound[] = {\sfx\Sirens.ogg, db-6, 1.0};
titles[] = {""};
};
class puk
{
name = "Siren3";
sound[] = {\sfx\Sirens2.ogg, db-6, 1.0};
titles[] = {""};
};
class playerSnoring
{
name="playerSnoring";
sound[]={sfx\snoring.ogg,0.9,1};
titles[] = {};
};
};
One last thing before bed - if you're trying to get the sounds to play, does the playSound command work?
playSound "puk";
Code:// sounds class CfgSounds { sounds[]={nam,eve,puk,playerSnoring}; class nam { name = "Siren1"; sound[] = {\sfx\SirenLoopMono.ogg, db-6, 1.0}; titles[] = {""}; }; class eve { name = "Siren2"; sound[] = {\sfx\Sirens.ogg, db-6, 1.0}; titles[] = {""}; }; class puk { name = "Siren3"; sound[] = {\sfx\Sirens2.ogg, db-6, 1.0}; titles[] = {""}; }; class playerSnoring { name="playerSnoring"; sound[]={sfx\snoring.ogg,0.9,1}; titles[] = {}; }; };
The last sound that is defined in the titles line has this
titles[] = {};
Now in the original code on page 1 it has this
titles[] = {""};
Which is correct?
Glad you like it! I'm still working on why these sirens won't play. Nice pic too! Definitely could be sweet for events. I think I will build a random timer in eventually too.
Calling it through the init or mission.sqm?
If you get a chance, throw in a playSound command to see if you can get to the sounds at all.
With that bit of code are you getting siren sounds? I notice that the cfg is inconsistent - the path names refer to the same folder both with a leading \ and without (sfx\snoring.ogg and \sfx\Sirens.ogg, etc) - this could be an issue maybe?this is a mixture of 2 scripts that im using, the last sound defined is from a different script so i just included it the same way it was in that script. you will also notice the location of the sounds is different from the first post on here![]()
Great, that would be really helpful! If that does not work, I'm thinking it may be the call through init.sqf - unless someone has sirens working, that is calling via init.sqf. I will test this call method later today if I have time, as I have only ever called in my mission.sqm.Was calling via init.sqf
Can probably give playSound a try at some point
As of yet i have never been in the right place at the right time (random script used) so only know its working from the logs however the other script (healing when sleeping at the tent) the sound works ok for that. I didnt realise i had the leading \ so will update it and see how it goes.With that bit of code are you getting siren sounds? I notice that the cfg is inconsistent - the path names refer to the same folder both with a leading \ and without (sfx\snoring.ogg and \sfx\Sirens.ogg, etc) - this could be an issue maybe?
I believe titles handles the subtitles that play at the same time as the sound plays, just so you guys know. Shouldn't matter really what's in there, as long as the format's nice.
That's volume adjustment, I believe. DB is decibels, so you're setting at -6. Not 100% on the second numbers meaning.As of yet i have never been in the right place at the right time (random script used) so only know its working from the logs however the other script (healing when sleeping at the tent) the sound works ok for that. I didnt realise i had the leading \ so will update it and see how it goes.
Out of intrest, what does this do? "db-6, 1.0" as the other sound file has "0.9,1"
A little script to add an AIR RAID complete with bombing and siren to a STATIC location or RANDOM locations
UPDATED: April 17 4pmEST
Random Locations (tested and confirmed 16/04 chernarus) updated april 16 around 7pm
Saved this as mmmyum_bomb.sqf in fixes folder (dayz_chernarus1.pbo/fixes/mmmyum_bomb.sqf)Code://////////////////////////////////////////////////////////////////////////////////////// // DayZ Air Raid written by // // mmmyum with work from // // sirens: http://www.armaholic.com/page.php?id=12598 by DarkXess // // bombs: http://www.armaholic.com/page.php?id=15612 by Maxjoiner // //////////////////////////////////////////////////////////////////////////////////////// /////////////////////////SETUP repeat and break sleep 10; _repeat = 30; //times to repeat _break = 120; //time to break between attacks _position = [13135.9, 10393.3, 1.5]; //leave this _xpos = 13135.9; _ypos = 10393.3; //repeat script diag_log format ["AIRRAID: Starting..."]; sleep 2; While {_repeat > 1} do { /////////////////////////SETUP position // enter positions below. format x,y,z _rndLoc=floor(random 6); _place= switch (_rndLoc) do { case 0: {"Electro"}; case 1: {"Berezino"}; case 2: {"NEAF"}; case 3: {"Stary"}; case 4: {"Vybor"}; case 5: {"Gorka"}; }; diag_log format ["AIRRAID: Random Location: %1 | %2",_rndLoc,_place]; _position= switch (_rndLoc) do { case 0: {[10480.6, 2217.8, 1.5]}; case 1: {[12043.9, 9091.3, 1.5]}; case 2: {[12073.9, 12724.3, 1.5]}; case 3: {[6143.6, 7721.5, 1.5]}; case 4: {[3815.1, 8865.0, 1.5]}; case 5: {[9659.0, 8795.3, 1.5]}; }; //////////////////////////SETUP type of bombing and duration _choice = 1; _duration = 60; ///////////////////////// _xpos = _position select 0; _ypos = _position select 1; _targetpos = [_xpos, _ypos, 1.5]; _loc = createVehicle ["HeliHEmpty", _targetpos,[], 0, "NONE"]; _target = createVehicle ["HeliHEmpty",position _loc,[], 0, "NONE"]; // target bombing sleep 2; diag_log format ["AIRRAID: INCOMING ATTACK: Sounding Siren at: %1 %2 | Repeat: %3| Type: %4 | Duration: %5",_xpos,_ypos,_repeat,_choice,_duration]; //sounds _pos = position _target; diag_log format ["AIRRAID: POS: %1 | TARGET: %2 | SHOULD MATCH",_pos,_targetpos]; _siren = createVehicle ["HeliHEmpty",position _target,[], 0, "NONE"]; _siren say ["eve",1000]; // siren sound sleep 60; _siren say ["puk",1000]; // siren sound sleep 60; _siren say ["eve",1000]; // siren sound sleep 60; _siren say ["nam",1000]; // siren sound sleep 60; _siren say ["puk",1000]; sleep 60; // wait a while _siren say ["nam",1000]; sleep 5; //thats enough warning //start bombing init _choise = _choice; // choise bombing: 1 = light 2 = medium 3 = heavy _ray = 120; // ray of bombing _seconds = _duration; // time bombing diag_log format ["AIRRAID: Bombing Area: %1 %2",_xpos,_ypos]; //start bombing While {_seconds > 1} do { _sound = createVehicle ["HeliHEmpty",position _target,[], _ray, "NONE"]; _sound say ["mortar1",1000]; sleep 2; If (_choise == 1) then { _espl = createVehicle ["SH_105_HE",position _sound,[], 0, "NONE"]; }; If (_choise == 2) then { _espl = createVehicle ["SH_125_HE",position _sound,[], 0, "NONE"]; }; If (_choise == 3) then { _espl = createVehicle ["BO_GBU12_LGB",position _sound,[], 0, "NONE"]; }; _seconds = _seconds - 1; deletevehicle _sound; }; sleep 60; _repeat = _repeat - 1; deletevehicle _siren; deletevehicle _loc; deletevehicle _target; diag_log format ["AIRRAID: Going down for sleep: Repeat:%1 | Sleep:%2",_repeat,_break]; sleep _break; }; exit
I added to this to init.sqf
Just put it at the bottom of your list hereCode:_airraid = [] execVM "fixes\mmmyum_bomb.sqf";
And added this to description.extCode:if (isServer) then { _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf"; _airraid = [] execVM "fixes\mmmyum_bomb.sqf"; };
Is this the newest version? I've been reading through and I've found multiple posts and multiple threads.Code://sounds class CfgSounds { sounds[]={nam,eve,puk}; class nam { name = "Siren1"; sound[] = {\fixes\sfx\SirenLoopMono.ogg, db-6, 1.0}; titles[] = {""}; }; class eve { name = "Siren2"; sound[] = {\fixes\sfx\Sirens.ogg, db-6, 1.0}; titles[] = {""}; }; class puk { name = "Siren3"; sound[] = {\fixes\sfx\Sirens2.ogg, db-6, 1.0}; titles[] = {""}; }; };
I want to use the init.sqf version. Is there a working init.sqf version using Sarge AI?
Couldn't tell if the .031 version is for mission.sqf or init.sqf
Thanks for the help,
Matt
13:17:31 "RANDOM WORLDSPACE: Komarovo | [3654.09,2475.95,1.5]"
13:17:33 Warning: z\addons\dayz_communityassets\models\razor.p3d:0 Error while trying to generate ST for points: 214, 349, 208
13:17:34 "RANDOM WORLDSPACE SELECTED: 19 | City: Komarovo | Coords: 3654.09 2475.95 |||Try 30"
13:17:34 "AIRRAID: SEL: [3654.09,2475.95,1.5] | TARGET: [3654.09,2475.95,1.5] | SHOULD MATCH APPROX"
13:17:36 "AIRRAID: BOMBER: UH-1H | Lift Off at [1623.71,218.188,300] | with Backup WP [7492.67,15263]"
13:17:36 "AIRRAID: BOMBER: UH-1H | TYPE: UH1H_DZ |"
13:17:36 "AIRRAID: BOMBER: UH-1H started flying from [1623.71,218.188,300] to [3582.26,2404.67] NOW!(TIME:4|)"
13:17:36 "AIRRAID: BOMBER: LANDINGZONE: [3582.26,2404.67,0] | BOMBER POS: [1623.71,218.188,131.767] | POS LAND: [3582.26,2404.67]"
13:17:38 "CLEANUP: KILLING A HACKER Haley Smith C 1-1-B:1 REMOTE IN UH1H_DZ"
13:17:38 Client: Object 3:39 (type Type_69) not found.
13:17:38 Client: Object 3:39 (type Type_70) not found.
13:17:54 "Deleting object UH1H_DZ with invalid ID at pos [6989.98,175.771,133.228]"
Updating the OP now. There are multiple versions, but the RANDOM one in the OP is working correctly for me (this update is just adding more diag_logs for people's debugging). Most stable up to date is always in the OP.
Animated Airraid AI Bombing is in super alpha, and is basically unworking. Just posted and update of that. When that works, it will be added to OP.
Random/Static Airraid scripts have no requirements - everything is built in - simply execute it via init.sqf or mission.sqm (how I do it). It does depend on createVehicle command (makes sirens/bombs/sounds) so you will have to deal with your BE.