[Atmosphere] Radio Chatter Help

not sure if I did it right, not hearing any sounds:
init.sqf
Code:
if (!isDedicated) then {
if (isClass (configFile >> "CfgBuildingLootNamalsk")) then {
0 fadeSound 0;
[] execVM "Scripts\kh_actions.sqf";
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
 
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =  [] execVM "\nst\ns_dayz\code\system\player_monitor.sqf";
_nul = [] execVM "loginCamera.sqf";
////////////////////////////////ADD THIS ADD THIS ADD THIS///////////////////////////
    //[broadcast chance, sleep timer]
    [1, 600] execVM "scripts\radioChatter.sqf";
   ////////////////////////////////ADD THIS ADD THIS ADD THIS///////////////////////////
} else {
endLoadingScreen;
0 fadeSound 0;
0 cutText ["You are running an incorrect version of DayZ: Namalsk, please download newest version from http://www.nightstalkers.cz/", "BLACK"];
};

description.ext
Code:
class RscPicture
{
access=0;
type=0;
idc=-1;
style=48;
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
font="TahomaB";
sizeEx=0;
lineSpacing=0;
text="";
};
 
class CfgSounds
{
sounds[] ={radio1,radio2,radio3,radio4,radio5};
 
class radio1
{
    name="radio1";
    sound[]={sounds\radio1.ogg, 0.3, 1};
    titles[] = {};
};
class radio2
{
    name="radio2";
    sound[]={sounds\radio2.ogg, 0.3, 1};
    titles[] = {};
};
class radio3
{
    name="radio3";
    sound[]={sounds\radio3.ogg, 0.3, 1};
    titles[] = {};
};
class radio4
{
    name="radio4";
    sound[]={sounds\radio4.ogg, 0.3, 1};
    titles[] = {};
};
class radio5
{
    name="radio5";
    sound[]={sounds\radio5.ogg, 0.3, 1};
    titles[] = {};
};
    class introSong
    {
    name="introSong";
    sound[]={introSong.ogg,0.6,1};
    titles[] = {};
    };
};
 
class RscLoadingText : RscText
{
style = 2;
x = 0.323532;
y = 0.666672;
w = 0.352944;
h = 0.039216;
sizeEx = 0.03921;
colorText[] = {0.543,0.5742,0.4102,1.0};
 
not sure if I did it right, not hearing any sounds:
init.sqf
Code:
if (!isDedicated) then {
if (isClass (configFile >> "CfgBuildingLootNamalsk")) then {
0 fadeSound 0;
[] execVM "Scripts\kh_actions.sqf";
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
 
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =  [] execVM "\nst\ns_dayz\code\system\player_monitor.sqf";
_nul = [] execVM "loginCamera.sqf";
////////////////////////////////ADD THIS ADD THIS ADD THIS///////////////////////////
    //[broadcast chance, sleep timer]
    [1, 600] execVM "scripts\radioChatter.sqf";
  ////////////////////////////////ADD THIS ADD THIS ADD THIS///////////////////////////
} else {
endLoadingScreen;
0 fadeSound 0;
0 cutText ["You are running an incorrect version of DayZ: Namalsk, please download newest version from http://www.nightstalkers.cz/", "BLACK"];
};

description.ext
Code:
class RscPicture
{
access=0;
type=0;
idc=-1;
style=48;
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
font="TahomaB";
sizeEx=0;
lineSpacing=0;
text="";
};
 
class CfgSounds
{
sounds[] ={radio1,radio2,radio3,radio4,radio5};
 
class radio1
{
    name="radio1";
    sound[]={sounds\radio1.ogg, 0.3, 1};
    titles[] = {};
};
class radio2
{
    name="radio2";
    sound[]={sounds\radio2.ogg, 0.3, 1};
    titles[] = {};
};
class radio3
{
    name="radio3";
    sound[]={sounds\radio3.ogg, 0.3, 1};
    titles[] = {};
};
class radio4
{
    name="radio4";
    sound[]={sounds\radio4.ogg, 0.3, 1};
    titles[] = {};
};
class radio5
{
    name="radio5";
    sound[]={sounds\radio5.ogg, 0.3, 1};
    titles[] = {};
};
    class introSong
    {
    name="introSong";
    sound[]={introSong.ogg,0.6,1};
    titles[] = {};
    };
};
 
class RscLoadingText : RscText
{
style = 2;
x = 0.323532;
y = 0.666672;
w = 0.352944;
h = 0.039216;
sizeEx = 0.03921;
colorText[] = {0.543,0.5742,0.4102,1.0};
I have yet to look at the namalsk files to see exaclty how the init is arranged but it seems right to me. Try setting the 2nd number in the init line to 60 secs instead of the default 600 secs and see if u can get it to loop correctly.
 
And i also wrote thi sto just use a playSound command rather than play it in an AoE method to avoid unwanted detection in PvP servers. I can easily change that tho if anyone wants it to play out loud to anyone thats around.
 
alright so from what i see its right but you forgot to add in the ,introSong after the radio1-radio5 in description.ext
That is the only thing i can see that may cause issues. so just use this for your description.ext:
Code:
respawn = "BASE";
respawndelay = 5;
onLoadMission= "DayZ Namalsk";
OnLoadIntro = "Welcome to Namalsk";
OnLoadIntroTime = False;
OnLoadMissionTime = False;
disabledAI = true;
disableChannels[] = {0,2};
enableItemsDropping = 0;
onPauseScript = "";
briefing = 0;
debriefing = 0;
loadScreen = "LS.jpg";
 
class Header
{
    gameType = COOP;            //DM, Team, Coop, ...
    minPlayers = 1;                //Min # of players the mission supports
    maxPlayers = 50;            //Max # of players the mission supports
};
 
aiKills = 1;
diagRadio = 1;
diagHit = 1;
 
class RscText
{
    type = 0;
    idc = -1;
    x = 0;
    y = 0;
    h = 0.037;
    w = 0.3;
    style = 0x100;
    font = Zeppelin32;
    SizeEx = 0.03921;
    colorText[] = {1,1,1,1};
    colorBackground[] = {0, 0, 0, 0};
    linespacing = 1;
};
class RscPicture
{
    access=0;
    type=0;
    idc=-1;
    style=48;
    colorBackground[]={0,0,0,0};
    colorText[]={1,1,1,1};
    font="TahomaB";
    sizeEx=0;
    lineSpacing=0;
    text="";
};
class RscLoadingText : RscText
{
    style = 2;
    x = 0.323532;
    y = 0.666672;
    w = 0.352944;
    h = 0.039216;
    sizeEx = 0.03921;
    colorText[] = {0.543,0.5742,0.4102,1.0};
};
class RscProgress
{
    x = 0.344;
    y = 0.619;
    w = 0.313726;
    h = 0.0261438;
    texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
    colorFrame[] = {0,0,0,0};
    colorBar[] = {1,1,1,1};
};
class RscProgressNotFreeze
{
    idc = -1;
    type = 45;
    style = 0;
    x = 0.022059;
    y = 0.911772;
    w = 0.029412;
    h = 0.039216;
    texture = "#(argb,8,8,3)color(0,0,0,0)";
};
class CfgSounds
{   
sounds[] ={radio1,radio2,radio3,radio4,radio5,introSong};
 
class radio1
{
    name="radio1";
    sound[]={sounds\radio1.ogg, 0.3, 1};
    titles[] = {};
};
class radio2
{
    name="radio2";
    sound[]={sounds\radio2.ogg, 0.3, 1};
    titles[] = {};
};
class radio3
{
    name="radio3";
    sound[]={sounds\radio3.ogg, 0.3, 1};
    titles[] = {};
};
class radio4
{
    name="radio4";
    sound[]={sounds\radio4.ogg, 0.3, 1};
    titles[] = {};
};
class radio5
{
    name="radio5";
    sound[]={sounds\radio5.ogg, 0.3, 1};
    titles[] = {};
};
class introSong
{
    name="introSong";
    sound[]={introSong.ogg,0.6,1};
    titles[] = {};
};
};
 
//
// the loading screen itself
//
class DayZ_loadingScreen
{
    idd = -1;
    duration = 10e10;
    fadein = 0;
    fadeout = 0;
    name = "loading screen";
    class controlsBackground
    {
        class blackBG : RscText
        {
            x = safezoneX;
            y = safezoneY;
            w = safezoneW;
            h = safezoneH;
            text = "";
            colorText[] = {0,0,0,0};
            colorBackground[] = {0,0,0,1};
        };
    };
    class controls
    {
        class Title1 : RscLoadingText
        {
            text = "$STR_LOADING"; // "Loading" text in the middle of the screen
        };
        class CA_Progress : RscProgress // progress bar, has to have idc 104
        {
            idc = 104;
            type = 8; // CT_PROGRESS
            style = 0; // ST_SINGLE
            texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
        };
        class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse
        {
            idc = 103;
        };
        class Name2: RscText // the text on the top-left
        {
            idc = 101;
            x = 0.05;
            y = 0.029412;
            w = 0.9;
            h = 0.04902;
            text = "";
            sizeEx = 0.05;
            colorText[] = {0.543,0.5742,0.4102,1.0};
        };
    };
};
 
// logo watermark
class RscTitles {
    class wm_disp {
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
        fadeout = 0;
        duration = 10e10;
        controlsBackground[] = {};
        objects[] = {};
        class controls {
            class wm_text2 {
                idc = 1;
                x = safeZoneX+0.027;//safeZoneW*0.01;
                y = safeZoneY+safeZoneH-0.16;
                w = 0.151*safeZoneH;
                h = 0.057*safeZoneH;
                shadow = 2;
                class Attributes
                {
                    font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";
                    align = "left"; // put "center" here if you want some background
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };  // uncomment and increase 4th number to have a background
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};
 
#include "addons\SARGE\SAR_define.hpp"
Just to test it change the init lines numbers from what you have, i think u have [1,600]....change that to [0.99,60]...
That way you can just test it and it will run the loop every 60 seconds with a 0.99% chance to play. Other than that i cant see anything that would prevent it from playing.
 
I dont think this would cause a problem but i have seen it happen nefore in some cases. Your folder named Scripts has a capital S, mine calls for a scripts folder all lower case. Change the init line where it says "scripts\radioChatter.sqf" to a captial S so it reads "Scripts\radioChatter.sqf"
 
Can u Help me? On my Epoch server does't work (((

I changed chance and frequency with 600 to 60 and helps nothing, the sound isn't present
But Snooping and itrosong is worck well!


my Desc-n.ext


class CfgSounds
{
sounds[] = {playerSnoring,introSong,radio1,radio2,radio3,radio4,radio5};

class playerSnoring
{
name="playerSnoring";
sound[]={\custom\sfx\snoring.ogg,0.9,1};
titles[] = {};
};

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

class radio1
{
name="radio1";
sound[]={radio1.ogg,0.3,1};
titles[] = {""};
};

class radio2
{
name="radio2";
sound[]={radio2.ogg,0.3,1};
titles[] = {""};
};

class radio3
{
name="radio3";
sound[]={radio3.ogg,0.3,1};
titles[] = {""};
};

class radio4
{
name="radio4";
sound[]={radio4.ogg,0.3,1};
titles[] = {""};
};

class radio5
{
name="radio5";
sound[]={radio5.ogg,0.3,1};
titles[] = {""};
};
};
-- sounds *radio1,radio2 ...* are in the root folder

my INIT (some block)


if (!isDedicated) then {[] execVM "Scripts\kh_actions.sqf";
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

[] execVM "Scripts\weather\effects.sqf";
[] execVM "Scripts\weather\sand.sqf";

//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "playerspawn.sqf";}];
_playerMonitor =[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

_nul = [] execVM "loginCamera.sqf";

_nul = [] execVM "playerspawn.sqf";

_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";

//[broadcast chance, sleep timer]
[0.99, 60] execVM "Scripts\radioChatter.sqf";

//Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};

----folder *Scripts* begins with a capital letter as is registered in a code
 
ok everyone just use this for your radioChatter.sqf file. It will cut a message telling you when its happening and i slightly altered the spawn method for the message.
Code:
While {alive player} do {
 
private ["_itemsPlayer","_hasRadio","_playerPos","_message","_broadcastChance"];
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Init Variables
_broadcastChance =        _this select 0;
_sleepTimer =            _this select 1;
 
//Radio Variables
_itemsPlayer =        items player;
_hasRadio =        "ItemRadio" in _itemsPlayer;
 
_message =            ["radio1","radio2","radio3","radio4","radio5"] call BIS_fnc_selectRandom;
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
//Make sure player has a radio
if (_hasRadio) then {
   
    //Chance Variables
    _spawnRoll = random 1;
       
    if (_spawnRoll <= _broadcastChance) then {
       
        cutText ["Your radio is picking up a transmission.","PLAIN DOWN"];
        sleep 3;
        //message counter
        _rareLocationCounter = 0;
        While {_rareLocationCounter < 2} do {
            playSound _message;
            sleep 30;
        _rareLocationCounter = _rareLocationCounter + 1;
        };
    };
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
sleep _sleepTimer;
};
 
ok everyone just use this for your radioChatter.sqf file. It will cut a message telling you when its happening and i slightly altered the spawn method for the message.
Code:
While {alive player} do {
 
private ["_itemsPlayer","_hasRadio","_playerPos","_message","_broadcastChance"];
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Init Variables
_broadcastChance =        _this select 0;
_sleepTimer =            _this select 1;
 
//Radio Variables
_itemsPlayer =        items player;
_hasRadio =        "ItemRadio" in _itemsPlayer;
 
_message =            ["radio1","radio2","radio3","radio4","radio5"] call BIS_fnc_selectRandom;
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
//Make sure player has a radio
if (_hasRadio) then {
 
    //Chance Variables
    _spawnRoll = random 1;
     
    if (_spawnRoll <= _broadcastChance) then {
     
        cutText ["Your radio is picking up a transmission.","PLAIN DOWN"];
        sleep 3;
        //message counter
        _rareLocationCounter = 0;
        While {_rareLocationCounter < 2} do {
            playSound _message;
            sleep 30;
        _rareLocationCounter = _rareLocationCounter + 1;
        };
    };
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
sleep _sleepTimer;
};



I Past it in radioChatter but nothings plays(radio) and no message (
 
Have you enabled radio in your Epoch mission init.sqf?

your looking for this around line 17/18:

//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio true;

Make sure it's set to true, iirc it's set to false (off) as default.
 
Have you enabled radio in your Epoch mission init.sqf?

your looking for this around line 17/18:

//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio true;

Make sure it's set to true, iirc it's set to false (off) as default.


I have False, but set *true* after u'r post... but nothing, im take onli tex mess-ge from AI... but radio.ogg not work (
 
im not sure where your problem is. Its a pretty basic script and i know it works. This doesnt nee radioenabled either. If you pasted my above code that i updated and you cant even get a message to cut then its not running at all. Im going to test this one more time just to be absolutely sure its nothing i have instructed wrong.
 
ok so i htink thi sis what i did not put in the radioChatter.sqf
at the very top of the file add this
Code:
waitUntil {!isNil ("dayz_animalCheck")};
sleep 10;
 
ok so i completely left out this last part from all of the posts. Go to the end of your radioChatter.sqf and add this to the very end

};

You can dd the waitUntil if you want but i dont believe thats necessary, however; the closing bracket kind of is lol sorry everyone :p
 
Back
Top