Jump to content
Clarkey1

Ambient Radio Chatter

Recommended Posts

ARC.jpg

Ambient Radio Chatter v1.2

by

Clarkey

Description:

A script that adds ambient radio chatter to ArmA 3 vehicles.

Features:

- Adds to the "battlefield ambiance" of A3.

- Easy customization

- Only uses tracks from the A3 Alpha so no addons are required.

Installation:

1. Copy the file "radio.sqf" to your missions folder.

2. Create a trigger set to "repeatedly" with:

- Condition:

vehicle player != player;

- On Activation:

nul = [this] execVM "radio.sqf";

3. Place any vehicle on the map.

4. Enjoy!

Customization:

Time Interval

To change the time open the radio.sqf and change the number "300":

sleep random 300;

And the number "300":

[["RadioAmbient2, "3", "etc."], 300];

They represent time in seconds and can be changed to anything you want as long as they are the same in each field. You can also remove "random" if you want regular intervals but I find having it set to random adds to authenticity.

Volume

To change the volume open the radio.sqf and change the number "0.2" at the end of this line:

(0 fadeMusic 0.2);

You can use any value between 0 and 1. The default BIS music volume is 0.5.

Included files:

radio.sqf

Usage:

Just credit me if you use it. You don't have to ask permission.

Change log:

v1.2

- [ADDED] Volume setting (see customization)

- [CHANGED] Default volume set to 0.2 (sounds less intrusive now)

- [FIXED] Script now terminates when player exits vehicle.

v1.1

- [ADDED] Sample Mission

- [CHANGED] Default timer now set to 300

Known Issues:

Even though the script now stops correctly on exiting a vehicle the loop itself will continue and you will probably still hear the effect once more within 5 minutes (or whatever you may have set the timer to) of exiting.

Notes:

I'm extremely new to scripting so feedback is welcome.

Credits & Thanks:

Thanks to BIS for the ArmA series of course, and thanks to the community for having an answer to everything ArmA related.

Link:

Armaholic

MultiUpload

Edited by Clarkey1

Share this post


Link to post
Share on other sites
Only me not working?

Not sure, are the sounds playing at all? Did you make sure the trigger condition and on activation have the correct code? I was just running it ok.

What are those tracks reffer to? Audiable radio?

Yeah, the vanilla "RadioAmbient" tracks.

Share this post


Link to post
Share on other sites
Release frontpaged on the Armaholic homepage.

Thanks Foxhound :)

That's a good idea by using BIS_fnc_music.

Thanks.

Can you upload sample mission please?

Yep, just updated the link, sample mission is now included.

Share this post


Link to post
Share on other sites

First off, thanks Clarkey. That script works nicely!

I am completely new to the Arma 3 editor, I was wondering if you could tell me what this line actually means "vehicle player != player;". I assume the first part means playable vehicle and after the equal means when player is in playable vehicle?

I guess what I'm trying to do is understand the logic in the script line to help myself slowly learn how it all works.

Sorry to be a pain.

Many Thanks

Skip

Share this post


Link to post
Share on other sites

I am completely new to the Arma 3 editor, I was wondering if you could tell me what this line actually means "vehicle player != player;". I assume the first part means playable vehicle and after the equal means when player is in playable vehicle?

Skip

Basically everything that is playable in Arma is a "vehicle", even the infantry. So say you spawn in as a Rifleman. That rifleman is now the players vehicle and when he gets into another vehicle such as a Hunter MRAP the player's vehicle (vehicle player) becomes not equal to (!=) the (player). Alternatively if you wanted another unit entering a vehicle to fire the trigger you would name the unit and change the condition field to "vehicle MyUnitNameHere != MyUnitNameHere". Also if you wanted to use the script only for a specific vehicle, you would name the vehicle and change the condition field to "vehicle player == MyVehicleNameHere" or simply "player in MyVehicleNameHere". I don't know if that's the best explanation I hope it made sense.

Edited by Clarkey1

Share this post


Link to post
Share on other sites

Yes that makes sense thanks alot for taking the time to explain it to me!

So when you refer to player, that can be triggered by any human player if you were playing 4 co-op?

Also the trigger, will that one only activate within the radius or is it looking across the map for its condition to be met and triggered? I'm still getting the hang of triggers and at what point they are radius based (such as not present, opfor) or an end mission trigger I used !(alive "unitnamehere").Which detects across the entire map.

Skip

Share this post


Link to post
Share on other sites

Not sure how it goes in co-op but theoretically I can't see why it wouldn't work. It might play it more often because there are multiple player entering/exiting vehicles but you could simply extend the "time random _number" line if it was playing too often.

The trigger size can just be set to 0 if you want, it doesn't take trigger radius into account. You should watch this tutorial if you haven't already:

. And as far as I can tell the triggers in Arma3 work pretty much the same as in Arma2 so any trigger tutorial for A2 should still be relevant too. Edited by Clarkey1

Share this post


Link to post
Share on other sites

Thanks again, I've seen the tutorial but will watch the rest of his for further insights.

Skip

Share this post


Link to post
Share on other sites

Thank you for the script, it's the little things that matter a lot :D

---------- Post added at 06:56 PM ---------- Previous post was at 05:42 PM ----------

Hmm I have an array

f_var_vehicles = [];
{if (_x isKindOf "LandVehicle" || _x isKindOf "Air" || _x isKindOf "Ship") then {f_var_vehicles = f_var_vehicles + [_x]}} forEach f_var_units;

// DEBUG
if (f_var_debugMode == 1) then
{
_str_f_var_vehicles = str f_var_vehicles;
DEBUG_OUTPUT format ["DEBUG %2: f_var_vehicles = %1",_str_f_var_vehicles, SLV_NAME];
};

So executing the script with

{execVM "scripts\ambientradio.sqf";} forEach f_var_vehicles

Should work but it's playing the sounds on each player.

Share this post


Link to post
Share on other sites

Thanks zorrobyte, but ah... I'm not quite sure where to use this. I tried running it from an init.sqf but couldn't get it working.

Share this post


Link to post
Share on other sites
Since the beta I've gotten this error on startup...

http://members.westnet.com.au/scott_k/not%20much/radio%20error.png (1115 kB)

It still seems to be working though.

Are you updating the script to suit the beta Clarkey?

If you remove or deactivate ( //_loop = this select 1; //if !(_loop) exitWith {}; ) the two lines it will play without looping & not show the errors. Once is enough for me ;)

Share this post


Link to post
Share on other sites
If you remove or deactivate ( //_loop = this select 1; //if !(_loop) exitWith {}; ) the two lines it will play without looping & not show the errors. Once is enough for me ;)

OK mate thanks I will try that.

Share this post


Link to post
Share on other sites

Clarkey1

How do i change the chatter from bis to my own custom made and only in designated vehicles like helo1, tank1 and 2?So i can use radio chatter mix with music !

Share this post


Link to post
Share on other sites

@Clarkey1 thanks very much for your great little script, definitely heightens the immersion. I had a few problems with bis_fnc_music continuing to play even when out of vehicle, so in the end I came up with a simple alternative that doesn't require any triggers and can just be run from init.sqf or the init line of anything in the editor:

// Ambient Radio Chatter in Vehicles
while {true} do
{
if (player != vehicle player) then 
	{
	playmusic format ["RadioAmbient%1",floor (random 31)];
	};
sleep random 60;
};

Share this post


Link to post
Share on other sites

Would love to have this as a simple addon (of course utilising CBA) that I could keep always on when inside (or perhaps even CLOSE to vehicles!)

Adding tpw's code in would also be great.

Share this post


Link to post
Share on other sites
@Clarkey1 thanks very much for your great little script, definitely heightens the immersion. I had a few problems with bis_fnc_music continuing to play even when out of vehicle, so in the end I came up with a simple alternative that doesn't require any triggers and can just be run from init.sqf or the init line of anything in the editor:

// Ambient Radio Chatter in Vehicles
while {true} do
{
if (player != vehicle player) then 
	{
	playmusic format ["RadioAmbient%1",floor (random 31)];
	};
sleep random 60;
};

Where are these RadioAmbient things stored? Would a say3D system like this work?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×