lonesoldier 0 Posted March 15, 2016 Hi guys, I'm making a Rainbow Six-ish mission, and I'm just wondering how I have the "tango down" and "threat neutralized" sound play every time an enemy is eliminated by either me or a co-op buddy? And to have those two sounds randomly alternate. Any help would be appreciated. I am fairly amateur at mission editing, so I don't know much about scripting or even what kind of sound format these files would need to be. Thanks guys. Share this post Link to post Share on other sites
Mynock 243 Posted March 15, 2016 Someone will probably be able to provide better details than I can, but I'd imagine it could be done with some type of script that counts how many of the enemy faction there are on the map, and each time that number count is reduced by one it triggers a sound to play. To randomize the sound you can use a simple randomizing script with a couple of numbers then set it up so that if it's 0 then play "Tango Down", if it's 1 play "Threat eliminated", and so on. I can at least tell you that sound files need to be .ogg format. 1 Share this post Link to post Share on other sites
beno_83au 1362 Posted March 15, 2016 You could look at adding a "Killed" event handler to all the enemy, and use it to play a sound of one of those two. https://community.bistudio.com/wiki/addEventHandler https://community.bistudio.com/wiki/playSound and https://community.bistudio.com/wiki/BIS_fnc_selectRandom So, each enemy's init field (or you could run a line in your init.sqf for every enemy unit) would look something like this: this addEventHandler ["killed", "playSound (['sound1','sound2] call BIS_fnc_selectRandom ;)"]; Something like that should work. As it says in the playSound wiki, be sure to set up your sounds in the description.ext Share this post Link to post Share on other sites
chris5790 24 Posted March 16, 2016 Killed EVH can only be assigned where the unit is local. This means you have to add it to the player in an init. If this EVH was triggered take the killer param to remoteExec a script function on the killers machine which is actually playing a sound. Share this post Link to post Share on other sites
beno_83au 1362 Posted March 17, 2016 From what i understand he only wants it on enemy ai, not players, so the EH could run and then remoteExec the playSound command Share this post Link to post Share on other sites
miasdad 94 Posted March 17, 2016 You could look at adding a "Killed" event handler to all the enemy, and use it to play a sound of one of those two. https://community.bistudio.com/wiki/addEventHandler https://community.bistudio.com/wiki/playSound and https://community.bistudio.com/wiki/BIS_fnc_selectRandom So, each enemy's init field (or you could run a line in your init.sqf for every enemy unit) would look something like this: this addEventHandler ["killed", "playSound (['sound1','sound2] call BIS_fnc_selectRandom ;)"]; Something like that should work. As it says in the playSound wiki, be sure to set up your sounds in the description.ext Is there a way to enable something like this for spawned AI?Or yet get a "kill-ticker"that keeps track of whom/what you killed & display it? Share this post Link to post Share on other sites
chris5790 24 Posted March 18, 2016 Well then it's much easier to add an MPKilled EVH which would trigger on each PC and can be added on en every machine. This way you would avoid doing a remoteExec. 1 Share this post Link to post Share on other sites
beno_83au 1362 Posted March 23, 2016 Well then it's much easier to add an MPKilled EVH which would trigger on each PC and can be added on en every machine. This way you would avoid doing a remoteExec. Yes, definitely, thank you for that. Share this post Link to post Share on other sites