- Right-click < Script < Origin
- Add Key/Value
Key: targetname
Value: repect_radio (or anything else you want)
Scripting
Create a GSC called "my_map.gsc" and place inside folder "raw/maps/mp".
Code: Select all
main()
{
  maps\mp\_load::main();
Â
  game["allies"] = "sas";
  game["axis"] = "russian";
  game["attackers"] = "axis";
  game["defenders"] = "allies";
  game["allies_soldiertype"] = "woodland";
  game["axis_soldiertype"] = "woodland";
Â
  thread music_one_item();
  thread music_multiple_items();
}
Â
music_one_item()
{
  respect_single = getent("respect_radio_single", "targetname") playLoopSound("respect");  // Soundalias = respect
}
Â
music_multiple_items()
{
  respect_box = getentarray("respect_radio","targetname");
Â
  for(i=0;i<respect_box.size;i++)
   respect_box[i] playLoopSound("respect"); // Soundalias = respect
}
- Create a file called "my_map.csv" and place this inside folder "raw/soundaliases"
- Save the following text into your CSV file (in notepad) [Where you see the word [EDIT], please remove this and make a single line of text]
- Open the file in Excel (unless you understand csv structures)
- Change first column to the alias of the sound. You will replace these in the GSC above ( // Soundalias = respect )
- The third column is the location of the file. I recommend creating a folder "my_map" and then placing your files in there.
- The fourth column is the minimum volume the file can be when inside the max distance.
- The fifth column is the maximum the volume will be.
- Change the values 100 and 250 (250 is the furthest you will hear the sound from and 100 is the distance from the sound where volume starts to decrease)
- Leave all other values alone.
Code: Select all
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,
[EDIT]compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage
,,,,,,,,,,,,,,,,,,,,,,,,,,,,
#Respect,,,,,,,,,,,,,,,,,,,,,,,,,,,,
respect,,mp_respect/respect.mp3,0,1,,,,100,250,auto,streamed,,looping,,,,,,,,,,,,,,,
- When using an MP3 make sure to set the bitrate at 96kbps (the game most likely allows more, however this is the setting I used successfully), you can change the bitrate using Audacity or a similar program.
- Place the sound file inside folder "raw/sound/my_map"
Zone File
- Open "zone_source\my_map.csv"
- Add "sound,my_map,,all_mp" to the bottom line