After some unsuccessfull attempts to add my own sound fx to CoH 2...
(extracted the SGA Sound archives, converted a .wav -> smf/bsc, edited the bsc and trying to repack the archive .... All failed...)
(would be a bad idea anyway, since everybody who wants to have the mod, would need the whole Sound Archive, which is actually quite a couple of MB...)
So my latest attempt was trying to use the SCAR file to add the sound.
I have seen that the command
Sound_Play2D is still available.
But all my attampts to get it working just fail
Does anybody has an idea, IF or HOW it could work ?
I have tried to use an tut-script from
BuckyBoy but it is not working. (It was for CoH not CoH2)
My idea was, to create the custom folders (\sound\wav & \sound\music) and place my custom soundfile (smf/bsc) into it.
Did anybody tried this allready or has an idea what could be wrong ?
g_streamed_sounds = {}
function Rule_Play_Streamed_Sound()
local sound_info = g_streamed_sounds[1]
Sound_PreCacheSound(sound_info.sound)
Sound_Play2D(sound_info.sound)
table.remove(g_streamed_sounds, 1)
TimeRule_RemoveMe()
if (#g_streamed_sounds > 0) then
Rule_AddOneShot(Rule_Play_Streamed_Sound, sound_info.time)
end
end
local function Play_Streamed_Sound(sound, time)
local sound_info = {
sound = sound,
time = time
}
table.insert(g_streamed_sounds, sound_info)
if (not TimeRule_Exists(Rule_Play_Streamed_Sound)) then
Rule_AddOneShot(Rule_Play_Streamed_Sound, 0)
end
function Test()
Play_Streamed_Sound("SOUNDS.ChurchBell01", 10)
--Play_Streamed_Sound("mysound2", 25)
end
Thanks alot !