Jump to content

Photo
- - - - -

Ambient Radio Chatter


  • Please log in to reply
29 replies to this topic
Thread Starter
Clarkey1
Clarkey1

    Staff Sergeant

  • Members
  • 224 posts

#1

Posted 12 March 2013 - 01:54

Posted Image
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, 14 March 2013 - 14:23.


lee1hy
lee1hy

    Lance Corporal

  • Members
  • 57 posts

#2

Posted 12 March 2013 - 02:37

Only me not working?

ffur2007slx2_5
ffur2007slx2_5

    Gunnery Sergeant

  • Members
  • 478 posts

#3

Posted 12 March 2013 - 03:34

Only uses tracks from the A3 Alpha

What are those tracks reffer to? Audiable radio?

Thread Starter
Clarkey1
Clarkey1

    Staff Sergeant

  • Members
  • 224 posts

#4

Posted 12 March 2013 - 04:40

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.

foxhound
foxhound

    Retired Moderator

  • Members
  • 11355 posts

#5

Posted 12 March 2013 - 07:41

Release frontpaged on the Armaholic homepage.

Posted Image
[ALPHA] Ambient Radio Chatter


Visit Armaholic.com | Visit Carriercommandaholic.com
Posted Image
Public FTP available, just check the Armaholic.com FAQ.

HMM........wonder what it is huh?

ffur2007slx2_5
ffur2007slx2_5

    Gunnery Sergeant

  • Members
  • 478 posts

#6

Posted 12 March 2013 - 08:06

That's a good idea by using BIS_fnc_music.

lee1hy
lee1hy

    Lance Corporal

  • Members
  • 57 posts

#7

Posted 12 March 2013 - 12:10

Can you upload sample mission please?

Thread Starter
Clarkey1
Clarkey1

    Staff Sergeant

  • Members
  • 224 posts

#8

Posted 12 March 2013 - 13:33

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.

skipspence
skipspence

    Private First Class

  • Members
  • 11 posts

#9

Posted 12 March 2013 - 15:14

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

John_CANavar
John_CANavar

    Private First Class

  • Members
  • 15 posts

#10

Posted 12 March 2013 - 21:19

Thx Clarkey1 !

Thread Starter
Clarkey1
Clarkey1

    Staff Sergeant

  • Members
  • 224 posts

#11

Posted 13 March 2013 - 14:25

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, 13 March 2013 - 14:53.


skipspence
skipspence

    Private First Class

  • Members
  • 11 posts

#12

Posted 13 March 2013 - 14:49

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

Thread Starter
Clarkey1
Clarkey1

    Staff Sergeant

  • Members
  • 224 posts

#13

Posted 13 March 2013 - 15:10

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: Arma 3 (alpha) - Editor Tutorial - Ep.3 Triggers. 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, 13 March 2013 - 15:13.


skipspence
skipspence

    Private First Class

  • Members
  • 11 posts

#14

Posted 13 March 2013 - 15:44

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

Skip

zorrobyte
zorrobyte

    Staff Sergeant

  • Members
  • 356 posts

#15

Posted 14 March 2013 - 18:56

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.

Thread Starter
Clarkey1
Clarkey1

    Staff Sergeant

  • Members
  • 224 posts

#16

Posted 15 March 2013 - 02:58

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.

-AMI- MoFo
-AMI- MoFo

    Sergeant

  • Members
  • 147 posts

#17

Posted 29 July 2013 - 02:33

Since the beta I've gotten this error on startup...


http://members.westn...radio error.png (1115 kB)


It still seems to be working though.


Are you updating the script to suit the beta Clarkey?

jgaz-uk
jgaz-uk

    Staff Sergeant

  • Members
  • 297 posts

#18

Posted 30 July 2013 - 16:58

Since the beta I've gotten this error on startup...


http://members.westn...radio error.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 ;)

-AMI- MoFo
-AMI- MoFo

    Sergeant

  • Members
  • 147 posts

#19

Posted 31 July 2013 - 13:19

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.

Valixx
Valixx

    Corporal

  • Members
  • 100 posts

#20

Posted 03 August 2013 - 20:00

Any update on the beta error? :)

www.valixx-online.de