Plays sound on item attach. Be advised, the config structure may slightly change in 1.11 update to allow for more complex use.
4383 {
4384 if (!
GetGame().IsDedicatedServer())
4385 {
4386 if (ConfigIsExisting("attachSoundSet"))
4387 {
4388 string cfg_path = "";
4389 string soundset = "";
4391
4394 ConfigGetTextArray("attachSoundSet",cfg_soundset_array);
4395 ConfigGetTextArray("attachSoundSlot",cfg_slot_array);
4396
4397 if (cfg_soundset_array.Count() > 0 && cfg_soundset_array.Count() == cfg_slot_array.Count())
4398 {
4399 for (int i = 0; i < cfg_soundset_array.Count(); i++)
4400 {
4401 if (cfg_slot_array[i] == slot_type)
4402 {
4403 soundset = cfg_soundset_array[i];
4404 break;
4405 }
4406 }
4407 }
4408
4409 if (soundset != "")
4410 {
4411 EffectSound sound = SEffectManager.PlaySound(soundset,
GetPosition());
4413 }
4414 }
4415 }
4416 }
eBleedingSourceType GetType()
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
proto native CGame GetGame()
array< string > TStringArray
class JsonUndergroundAreaTriggerData GetPosition