Plays sound on item attach. Be advised, the config structure may slightly change in 1.11 update to allow for more complex use.
4873 {
4874 if (!
g_Game.IsDedicatedServer())
4875 {
4876 if (ConfigIsExisting("attachSoundSet"))
4877 {
4878 string cfg_path = "";
4879 string soundset = "";
4881
4884 ConfigGetTextArray("attachSoundSet",cfg_soundset_array);
4885 ConfigGetTextArray("attachSoundSlot",cfg_slot_array);
4886
4887 if (cfg_soundset_array.Count() > 0 && cfg_soundset_array.Count() == cfg_slot_array.Count())
4888 {
4889 for (int i = 0; i < cfg_soundset_array.Count(); i++)
4890 {
4891 if (cfg_slot_array[i] == slot_type)
4892 {
4893 soundset = cfg_soundset_array[i];
4894 break;
4895 }
4896 }
4897 }
4898
4899 if (soundset != "")
4900 {
4901 EffectSound sound = SEffectManager.PlaySound(soundset,
GetPosition());
4903 }
4904 }
4905 }
4906 }
eBleedingSourceType GetType()
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
array< string > TStringArray
vector GetPosition()
Get the world position of the Effect.