Page 1 of 1
Adding multiple custom songs to sounds.lua?
Posted: Wed Oct 24, 2012 6:27 pm
by IronMaiden
Hi again, i have the defintion script for one song in mod_assets\scripts sounds.lua and it works fine. Now my question is how do I add more to that sound script? I tried to simplly leave 2 spaces and type in a new defination but i get a white text message top left screen ingame that says no such sound sample asylum.
My script sounds.lua looks like this:
-- This file has been generated by Dungeon Editor 1.3.1
-- TODO: place your custom sound definitions here
defineSound{
name = "invader",
filename = "mod_assets/sounds/invader.wav",
loop = false,
volume = 1,
minDistance = 30,
maxDistance = 32,
}
defineSound{
name = "asylum",
filename = "mod_assets/sounds/asylum.wav",
loop = false,
volume = 1,
minDistance = 30,
maxDistance = 32,
}
Re: Adding multiple custom songs to sounds.lua?
Posted: Wed Oct 24, 2012 10:56 pm
by Neikun
The only possibility is that there is no asylum.wav in the mod_assets/sounds folder.
Be sure to check format and typos.
Re: Adding multiple custom songs to sounds.lua?
Posted: Thu Oct 25, 2012 2:25 am
by IronMaiden
Neikun wrote:The only possibility is that there is no asylum.wav in the mod_assets/sounds folder.
Be sure to check format and typos.
yes the song is in the sound folder along with invader.wav and i rechecked all spelling. Did i place the definition script in the sounds.lua properly? By format you mean the type of sound file? if so it was converted same as invader into a wav
Re: Adding multiple custom songs to sounds.lua?
Posted: Thu Oct 25, 2012 2:28 am
by Neikun
I don't know what to say. It should work.
Here's a bug test. Cut the asylum sound script from sounds.lua and paste it in any other .lua script that gets loaded by your dungeon.
Re: Adding multiple custom songs to sounds.lua?
Posted: Thu Oct 25, 2012 3:25 am
by TheKuu
I had the same problem with some of my sounds for a while there. I believe I saw this in another thread, but the .wav files have to be 16 bit or they won't register as being there.
Re: Adding multiple custom songs to sounds.lua?
Posted: Thu Oct 25, 2012 11:13 am
by Komag
try switching the order, place the code for the second song first.
try renaming the files to each other's names
those ideas would just be to help narrow down the problem
Re: Adding multiple custom songs to sounds.lua?
Posted: Thu Oct 25, 2012 4:14 pm
by IronMaiden
wow after so much troubleshooting i found out what it was , even though all my music is in flac format i convert them to 16 bit @44100 hz wav files, turns out that entire album does not work so there must be a small variation in the file format that is causing this error.
I tried another file from another album and it worked.
So thank you to all for your help!