Thanks Rav Raven.
It works well except when the dogs die, the sound is still there. It is almost like having ghosts of dogs running around
Anyway of disabling/stopping sound once the dogs are dead?
Thanks Rav Raven.
It works well except when the dogs die, the sound is still there. It is almost like having ghosts of dogs running around
Anyway of disabling/stopping sound once the dogs are dead?
Captain Bravo
One of the serious problems in planning the fight against American doctrine, is that the Americans do not read their manuals, nor do they feel any obligation to follow their doctrine"
From a Russian General's Notebook
Join Bravo Company
A highly trained unit run by an ex cook, a hooker and an old pensioner, so expect the best!
http://forums.bistudio.com/showthread.php?t=80906
Just add these 2 lines (color red) of code after creating the sound and link it to the dog.
The variable that refers to the sound of the dog is stored (SetVariable) in the memory space corresponding to the unit (dog) and when the dog dies activates the eventhandler that read this variable (GetVariable) and uses it to eliminate the sound (deletevehicle).Code:_soundOn = createSoundSource ["Sound_Dog", position _perro, [], 0]; _soundOn attachto [_perro, [0,1,0.5]]; _perro setvariable ["soundDog", _soundOn]; _EHkilledIdx = _perro addEventHandler ["killed", {deletevehicle ((_this select 0) getvariable "soundDog")}];
Greetings.
It works great, thanks Rav Raven![]()