Page 2 of 4
Re: Sound script
Posted: Thu Sep 13, 2012 2:23 pm
by antti
Xzalander wrote:Oh well that is deflating :p Haha. Does that pply for other pre-defineds as well then, such as the particle systems?
Yes. The assets, pre-defined or otherwise, are generally referred to with strings.
Re: Sound script
Posted: Thu Sep 13, 2012 4:26 pm
by LordGarth
It is not finding the sound in the sound folder but the sound file is there and it is a wave file.
?
LordGarth
Re: Sound script
Posted: Fri Sep 14, 2012 8:29 pm
by LordGarth
I can use predefined sounds but the editor does not look for the new sounds, I believe the editor only looks in assets/sample.
LordGarth
Re: Sound script
Posted: Fri Sep 14, 2012 8:50 pm
by antti
LordGarth wrote:I can use predefined sounds but the editor does not look for the new sounds, I believe the editor only looks in assets/sample.
LordGarth
Can you post an example of what you have defined in your sounds.lua and in your script entity?
Re: Sound script
Posted: Fri Sep 14, 2012 10:05 pm
by LordGarth
defineSound = {
name = "scream1",
filename = "mod_assets/sounds/scream1.wav",
loop = false",
volume = 0.5,
minDistance = 30,
maxDistance = 32,
}
entityscript
function playsound()
playSound("scream1")
end
Re: Sound script
Posted: Fri Sep 14, 2012 10:13 pm
by Montis
looks like you need to remove the egual sign after defineSound.
Re: Sound script
Posted: Fri Sep 14, 2012 10:15 pm
by n0th1n9
Hi,
Try to remove the " just after 'false' on line 4 of your sounds.lua file, you hould have this :
Code: Select all
defineSound{
name = "scream1",
filename = "mod_assets/sounds/scream1.wav",
loop = false,
volume = 0.5,
minDistance = 30,
maxDistance = 32,
}
Maybe you should save your dungeon and reload it in the editor. I had the same issue as you and it worked for me.
Re: Sound script
Posted: Fri Sep 14, 2012 11:14 pm
by LordGarth
It says when I try to load the project. file not found modassets/sounds/scream1.wav
LG
Re: Sound script
Posted: Fri Sep 14, 2012 11:40 pm
by Montis
LordGarth wrote:It says when I try to load the project. file not found modassets/sounds/scream1.wav
LG
is the filename scream1.wav? remember case sensitivity. also this is strange since you should have defined "mod_assets" and not "modassets" (underscore being the difference)...
Re: Sound script
Posted: Fri Sep 14, 2012 11:53 pm
by LordGarth
it is underscored and the file name is correct
LG