Jump to content
Sign in to follow this  
viper[cww]

Stop sound when unit/ambient life is dead

Recommended Posts

Ok so i have a dead dog I.E.D placed on a road where bluefor patrols, I have my I.E.D script set and all is working...

Thing is I have a live dog near the dead dog, and it's mourning lets say its partner... i have used the sorrow dog sound.

My question is when the live dog dies from the explosion is there a code i could add to stop the sound from working?

(I have tried syncing the sound to the live dog but to no avail the sound still plays)

Thanks for any replies

Share this post


Link to post
Share on other sites

deleteTrigger

Actually, don't even need that. Just make the trigger's condition:

alive doggie

Edited by kylania

Share this post


Link to post
Share on other sites

put this in the dogs init? or make a seperate trigger? i placed the sound from empty not as a trigger but i guess i should make it as a trigger :)

Share this post


Link to post
Share on other sites

Ok I tried to do what you said from what i could understand, didnt work though.

What i did is:-

Synced Sorrow dog sound with the dog (has no name btw)

Added a trigger with alive doggie in the condition (trigger shows as ? Alive Doggie), then grouped that with the dog

(I looked in trigger tracks and music they didnt have sorrow dog)

Edited by VIPER[CWW]

Share this post


Link to post
Share on other sites

oooh, I see you're using the Sound Object, which can't be deleted or attachTo'd... Apparently the trigger doesn't work on it's own either...

If you're going to kill the doggie and check if it's alive or not you're going to have to name it. :) Grouping won't work, since you've changed the condition away from "this".

Here's a demo mission. The sound effect is under Trigger, not Music or Tracks... One trigger to attach the sound to the dog and follow it around, the other to delete the first trigger (and thereby the sound) when the dog dies.

Share this post


Link to post
Share on other sites

works great thanks, i didnt use the dead dog and BAF i.e.d as i am using a different script, and the dog is the i.e.d :)

Also, the sound effect i couldnt find under trigger (i know they're there) then i found BIS made a huge gap in their trigger names, which is why i couldnt find it, thanks again, wish you saw this post on armaholc mind as im there most :)

As VIPER[CWW] I'm guessing your Pirin (Same avatar)

Share this post


Link to post
Share on other sites

Yup, I'm Pirin over on Armaholic.

Where's the dead dog IED from? I couldn't find one, so just killed a dog and spawned the IED on him. heheh

Share this post


Link to post
Share on other sites

not a dead dog ied ;) i also killed a dog and added a trigger proximity around him on road and i already have a ied.sqf

Emery did make some ied's though, one of which is a dead dog and another a golden AK :)

found here

http://www.armaholic.com/page.php?id=10029

they work with OA too, its what he made for his Generation Kill MOD but hasnt got the time to update them.

Share this post


Link to post
Share on other sites

Huh? Sound objects can't be deleted or attachTo other objects? I'm pretty sure sound object is what the old Burn script used.

Anyhow, a couple of ideas. Two triggers? All the sound needs is for the trigger to be a true trigger. Since it's already true, why not spawn a script that looks for closest trigger when closes object of certain type (dog) is killed? You can even go further with dynamic creation, but here the simplest way might be to identify which trigger to delete by setting trigger text to class of sound that is assigned.

Hmm, what happens to a spawned script when the trigger is removed? Does it continue to run? Might have to do a while alive thistrigger do the rest :p Just spawning ideas here :)

Share this post


Link to post
Share on other sites
Huh? Sound objects can't be deleted or attachTo other objects? I'm pretty sure sound object is what the old Burn script used.

Anyhow, a couple of ideas. Two triggers? All the sound needs is for the trigger to be a true trigger. Since it's already true, why not spawn a script that looks for closest trigger when closes object of certain type (dog) is killed? You can even go further with dynamic creation, but here the simplest way might be to identify which trigger to delete by setting trigger text to class of sound that is assigned.

Hmm, what happens to a spawned script when the trigger is removed? Does it continue to run? Might have to do a while alive thistrigger do the rest :p Just spawning ideas here :)

In my tests when I tried to deleteVehicle the sound object, it was still there. Also when I tried to delete the trigger the sound was still there too. Definitely more than one way to kill a dog and turn it into a source of sadness for another dog before killing that dog as well! :) :butbut::yay:

Share this post


Link to post
Share on other sites
Huh? Sound objects can't be deleted or attachTo other objects? I'm pretty sure sound object is what the old Burn script used.

Anyhow, a couple of ideas. Two triggers? All the sound needs is for the trigger to be a true trigger. Since it's already true, why not spawn a script that looks for closest trigger when closes object of certain type (dog) is killed? You can even go further with dynamic creation, but here the simplest way might be to identify which trigger to delete by setting trigger text to class of sound that is assigned.

Hmm, what happens to a spawned script when the trigger is removed? Does it continue to run? Might have to do a while alive thistrigger do the rest :p Just spawning ideas here :)

I'm sure there are 101 ways of doing it but kylania found one of them and sorted it for me, thanks mate

Share this post


Link to post
Share on other sites
In my tests when I tried to deleteVehicle the sound object, it was still there. Also when I tried to delete the trigger the sound was still there too. Definitely more than one way to kill a dog and turn it into a source of sadness for another dog before killing that dog as well! :) :butbut::yay:

Was this Arma2 or OA? I remember I had nothing but problems with sounds and trigger based sounds in Arma. In some ways I still do, as now my trigger based sounds (dynamically scripted using setSoundEffect) have a tendency to just disappear for no apparent reason. The trigger is there, it's just that magic "sound object" that stops working.

I wish some developer could explain properly, once and for all, how trigger based sounds, cfgSFX (especially that empty[] list), setSoundEffect all works internally. Afaik nobody has ever deciphered cfgSFX. Is it supposed to be a secret or something? Sounds are alpha and omega to me, and not being able to control it is completely demoralizing.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×