Hey there. I've been messing around with Radiant for a couple of weeks now, and I managed to learn a lot of stuff. Enough to make a decent playable map. There's one thing, though, which seems impossible right now: Adding sounds.
I've went through dozens of tutorials on how to add amb sounds, with several different techniques and none of them worked. Lastly, I followed end to end this tut on youtube:
https://www.youtube.com/watch?v=8GogM_ulWU8
---------------------------------------------------------------------------------------------------------------
Well, I got my fluorescent_hum.wav file under /raw/sound/amb_elements
along with a few others from another tutorial, which are working ingame.
I got a mp_mapname.csv with these lines in it:
>elm_thunder_strike,1,amb_elements/elm_thunder_strike1.wav,0.85,0.99,element,0.8,1.1,100000,,element,,,,0.5,mp_2035,,,,,250,,,0.4,,,,,
>elm_thunder_strike,2,amb_elements/elm_thunder_strike4.wav,0.85,0.99,element,0.8,1.1,100000,,element,,,,0.5,mp_2035,,,,,250,,,0.4,,,,,
>elm_thunder_strike,3,amb_elements/elm_thunder_strike1.wav,0.85,0.99,element,0.8,1.1,100000,,element,,,,0.5,mp_2035,,,,,500,,,0.4,,,,,
>elm_thunder_strike,4,amb_elements/elm_thunder_strike4.wav,0.85,0.99,element,0.8,1.1,100000,,element,,,,0.5,mp_2035,,,,,750,,,0.4,,,,,
>elm_thunder_distant,1,amb_elements/elm_thunder_dist1.wav,0.8,1,element,0.8,1,100000,,element,,,,0.5,mp_2035,,,,,750,,,0.2,,,,,
>elm_thunder_distant,2,amb_elements/elm_thunder_dist4.wav,0.8,1,element,0.8,1,100000,,element,,,,0.5,mp_2035,,,,,750,,,0.2,,,,,
>elm_thunder_distant,3,amb_elements/elm_thunder_dist1.wav,0.8,1,element,0.8,1,100000,,element,,,,0.5,mp_2035,,,,,1000,,,0.2,,,,,
>elm_thunder_distant,4,amb_elements/elm_thunder_dist4.wav,0.8,1,element,0.8,1,100000,,element,,,,0.5,mp_2035,,,,,1000,,,0.2
>fluorescent_hum,,amb_elements/fluorescent_hum.wav,0.7,0.9,element,0.9,1,7,320,element,,,looping,,all_mp,,,,,,,,,,,,,
The first 8 being for the others sounds I have (from a tutorial), and they work fine. The last one is from the sound I'm trying to add.
In game, I got a script_origin with this key: targetname/fluorhum
I got this in my mp_mapname.gsc:
main()
{
maps\mp\_load::main();
maps\mp\mp_2035_fx::main();
maps\createfx\mp_2035_fx::main();
maps\mp\mp_2035_soundfx::main();
setExpFog(1500, 10000, 0.51, 0.42, 0.48, 0);
ambientPlay("ambient_overgrown_day");
game["allies"] = "sas";
game["axis"] = "russian";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";
setdvar("r_glowbloomintensity0",".1");
setdvar("r_glowbloomintensity1",".1");
setdvar("r_glowskybleedintensity0",".5");
setdvar("compassmaxrange","1300");
thread speakers();
}
speakers()
{
sound = getent("fluorhum","targetname");
sound PlayLoopSound("fluorescent_hum");
}
I have these lines on my zone file:
rawfile,maps/mp/mp_2035.gsc
rawfile,maps/mp/mp_2035_fx.gsc
rawfile,maps/mp/mp_2035_soundfx.gsc
rawfile,maps/createfx/mp_2035_fx.gsc
rawfile,soundaliases/mp_2035.csv
rawfile,sound/amb_elements/fluorescent_hum.wav
sound,mp_2035,mp_2035,!all_mp
But now when I play, the console shouts "missing soundalias 'fluorescent_hum'"
How's that? I currently use MS Excell to edit my .csv's. I just copied the format from the multiplayer.csv. Every line is written on a single cell, one on top of another. What could it be wrong? The code? Maybe the game can't read the lines in excell the way I'm writing them? Is there another program for this?
Thanks in advance.
edit: One more piece of info. If I take out the line "rawfile,soundaliases/mp_2035.csv", and change "!all_mp" to "all_mp", the level works fine without warnings.... But my sound still does not play at all.
edit2: If I replace the .wav file with some other sound from the game, it works. Which leads me to believe it could be the file format?
edited on Oct. 8, 2016 11:06 pm by Hascalod
edited on Oct. 9, 2016 12:40 am by Hascalod