FAQ: Sound & Music Index
How to get sound into your mission
Take a look at this tutorial which will explain everything.
How to make a voice sound like on a radio
Voices (and other sounds) on a radio or a phone sound crackly and distant. To achieve this effect requires only a few simple steps. The following steps assume that you have Goldwave - it's available as a trial version and is perhaps the best free sound editing software you could get, especially since it handles .ogg soundfiles.
Run Goldwave, click 'open' and load your voice file. Click 'Effect/Filter/Low-Highpass'. Select 'Highpass' and preview the sound. It will sound a lot more radio-like. Apply the filter and save the file.
How to make a car radio
Let's break this down into stages:
- You want a "Switch on radio" action to appear when you get in to the vehicle
- When activated, the music should begin and the action should change to "Switch off radio"
- You want the music to stop when the "Switch off radio" action is activated
- When you exit the vehicle, you want the actions to disappear
The vehicle in question needs a getin eventhandler attached to it.
We also need to remove the radio action if the unit gets out of the vehicle with a getout eventhandler:
The radio_activate.sqs script would look something like this:
;OFPEC Ed Depot ;activate radio script ;get passed parameters _vehicle = _this select 0 _position = _this select 1 _unit = _this select 2 ;only activate the action if the unit is in the driving position ?not (_position == "driver") : exit ;add the radio action to the vehicle radio = _vehicle addaction ["Switch on radio", "radio_on.sqs"]
The radio_on.sqs script would look something like this:
;OFPEC Ed Depot ;switch on radio ;get passed parameters _vehicle = _this select 0 _unit = _this select 1 _actionindex = _this select 2 ;start the music playmusic "track13" ;remove the 'switch on radio' action _vehicle removeaction _actionindex ;add the 'switch off radio' action radio = _vehicle addaction ["Switch off radio", "radio_off.sqs"]
The radio_off.sqs script would look something like this:
;OFPEC Ed Depot ;switch off radio ;get passed parameters _vehicle = _this select 0 _unit = _this select 1 _actionindex = _this select 2 ;end the music playmusic ["track13",9999] ;remove the 'switch off radio' action _vehicle removeaction _actionindex ;add the 'switch on radio' action radio = _vehicle addaction ["Switch on radio", "radio_on.sqs"]
The radio_deactivate.sqs script would look something like this:
;OFPEC Ed Depot ;deactivate radio script ;get passed parameters _vehicle = _this select 0 _position = _this select 1 _unit = _this select 2 ;remove the radio action _vehicle removeaction radio ;stop the music, in case it's still playing playmusic ["track13", 9999]
Note that if you get into the vehicle and then move into the driver's seat, the radio action will not be activated. This can easily be solved by removing the driver seat check in the radio_activate.sqs script, however that would mean that units in the cargo area of a truck would be able to use the radio - which is usually mounted on the dashboard.
Take a look at this demomission to see the above scripts in action.
