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.
waitUntil {!isNil ("dayz_animalCheck")};
sleep 10;
While {alive player} do {
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Init Variables
_msgChance = _this select 0;
_sleepTimer = _this select 1;
vanillaDayz = _this select 2;
_itemsPlayer = items player;
_hasRadio = "ItemBandage" in _itemsPlayer; // <------ like this
// removed radio off variable
_vanillaMsg = ["radio_static","radio_transmission_russian","radio_transmission_wombat"] call BIS_fnc_selectRandom;
_crueMsg = ["radio1","radio2","radio3","radio4","radio5"] call BIS_fnc_selectRandom;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Make sure player has a radio
if (_hasRadio) then {
//removed radio off
//Chance Variables
_spawnRoll = random 1;
//Roll chance to see if message will be played
if (_spawnRoll <= _msgChance) then {
//Message is going to be played. Notify the player. Comment out to disable notification.
cutText ["Your radio is picking up a transmission.","PLAIN DOWN"];
sleep 3;
//message counter
_msgCounter = 0;
//Change < Num to make sound play more than once. Also adjust sleep time after each message played if you play more than once.
While {_msgCounter < 1} do {
//Play message for default
if (vanillaDayz) then {
//Play message to player only
playSound _vanillaMsg;
sleep 60;
} else {
//Play message to player only
playSound _crueMsg;
sleep 60;
};
//Plus one to counter after each loop.
_msgCounter = _msgCounter + 1;
};
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Sleep timer. Set in init.sqf
sleep _sleepTimer;
};
};//end loop and restart
Zee, I'm curious where you are going with this? It's been on my mind to do something along the lines of this for my mission packages. I'd like to spawn them with audio if the player is carrying a radio but I've been unsure if that was feasible. Something like this...
<Mission chopper crash spawns>
Audio (mixed to sound like it's a handheld radio with chopper engine sounds in the background): "Mayday mayday mayday, this is Legion air support seven niner. We have main hydraulics failure and are going down hard. Request immediate troop support on our location." Then a short reply from Legion headquarters: "Legion air seven niner, troop support dispatched and on station in five minutes". Then you get the nice pop-up that the mission has spawned.
I've done this sort of ambiance audio work before on other mods and although it's time consuming it really adds to the atmosphere. If I knew it was feasible to do I'd certainly pursue it.
You could add a public variable to the animated heli crash script. Just replace the old school one with an audio one and it will trigger when the heli spawns or just put it further down the page when it crashes. That is an idea i had but i was pursuing more of a radio based cyptic mission with hella rewards if one where to crack the code. Sort of like Lost, except, not terrible lol
I really like your idea. I am very close to being done with version 2.0 and this will be able to be incorporated into any other script with a simple public variable. I will spare the explanation but short story is this will be much more than radio chatter very soon. If anyone is interested in working with me I would love thatZee, I'm curious where you are going with this? It's been on my mind to do something along the lines of this for my mission packages. I'd like to spawn them with audio if the player is carrying a radio but I've been unsure if that was feasible. Something like this...
<Mission chopper crash spawns>
Audio (mixed to sound like it's a handheld radio with chopper engine sounds in the background): "Mayday mayday mayday, this is Legion air support seven niner. We have main hydraulics failure and are going down hard. Request immediate troop support on our location." Then a short reply from Legion headquarters: "Legion air seven niner, troop support dispatched and on station in five minutes". Then you get the nice pop-up that the mission has spawned.
I've done this sort of ambiance audio work before on other mods and although it's time consuming it really adds to the atmosphere. If I knew it was feasible to do I'd certainly pursue it.