So i was editing a map and i wanted to make a sound when the bomb is planted... So yea.. how do you do it? i've made a sound etity so far (greatest achievment of ma leif )
Thanks
Le noob at lua
@ VADemon: So what do i need in order to change the sound? i know i need to find the name of the file, but do i need to put the directory of it or what?
Just change the path parameter of sv_sound. Of course, the path destination must be correct otherwise you'll get an error that either the file is corrupt or the path file doesn't exist.
@ GeoB99: I couldn't understand you sorry... but sometimes lua just makes my mind internet explorer...
can you formulate it so i can understand? like for example change the code... Sorry i am puttin you up but i am really shit :<
I don't get how it can be so difficult to understand. It's quite self explanatory at how you should do and it takes like few seconds to do this simple step.
Anyways, as you want how to change a file sound with another, we have to look at this line:
1
parse("sv_sound fun/thats_the_way.wav")
Our main focus is the path parameter of the file, therefor the path is inside the sv_sound which is fun/thats_the_way.wav. Usually, the sound files are relatively in sfx folder so they should stay there.
No matter if there is a subfolder inside sfx folder, the main rule is that the sounds must simply stay there!
If we have for example a file named blabla.wav inside a subfolder named test then the path destination should be like this.
1
parse("sv_sound test/blabla.wav")
That's it. No hard tasks or anything else it's just a simple one and even a kid could do that. Quite understable now?
Notice: You must use "/" (slash - without quotes) if there are separable destinations such as subfolders.