Plays sound on item attach. Be advised, the config structure may slightly change in 1.11 update to allow for more complex use.
4455 {
4456 if (!
GetGame().IsDedicatedServer())
4457 {
4458 if (ConfigIsExisting("attachSoundSet"))
4459 {
4460 string cfg_path = "";
4461 string soundset = "";
4463
4466 ConfigGetTextArray("attachSoundSet",cfg_soundset_array);
4467 ConfigGetTextArray("attachSoundSlot",cfg_slot_array);
4468
4469 if (cfg_soundset_array.Count() > 0 && cfg_soundset_array.Count() == cfg_slot_array.Count())
4470 {
4471 for (int i = 0; i < cfg_soundset_array.Count(); i++)
4472 {
4473 if (cfg_slot_array[i] == slot_type)
4474 {
4475 soundset = cfg_soundset_array[i];
4476 break;
4477 }
4478 }
4479 }
4480
4481 if (soundset != "")
4482 {
4483 EffectSound sound = SEffectManager.PlaySound(soundset,
GetPosition());
4485 }
4486 }
4487 }
4488 }
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