Page 2 of 3
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:01 am
by IronMaiden
Neikun wrote:I want to help you but can't think clearly. I'm sorry.
Hehe thats no prob Neikun , I thank you for trying none the less.
I just want this darn song to play when i enter this room full of loot. I can't trigger it to start for the life of me. I tried placing the lua script with the function on the floor in the room, i get nothing when i step in there and if I add any item like a pressure place ot lever or wall button and add the connecter to the lua script it crashes with the stack overflow line
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:04 am
by Neikun
Try replacing playSound("invader") with playSound("level_up") as a debug.
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:13 am
by IronMaiden
Neikun wrote:Try replacing playSound("invader") with playSound("level_up") as a debug.
Tried it same error stack overflow when i connect it to a switch
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:15 am
by Neikun
Okay so we have localized the problem. it must be something wrong with the function.
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:16 am
by IronMaiden
this is what my sounds.lua file looks like from within my custom dungeon Mod_asset/sound :
-- 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 = 0.5,
minDistance = 30,
maxDistance = 32,
}
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:19 am
by Neikun
IronMaiden wrote:this is what my sounds.lua file looks like from within my custom dungeon Mod_asset/sound :
-- 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 = 0.5,
minDistance = 30,
maxDistance = 32,
}
so if we try merging your broken code with my working code, we should get it working. (hopefully)
Code: Select all
function invadersound()
playSound("invader")
end
EDIT: My only other theory is changing your min distance to 28 and max to 30?
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:23 am
by IronMaiden
woohoo that did it thanks so much!!!!
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:29 am
by Neikun
Which did it? The min distance?
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:39 am
by Komag
that one I don't know about, but sounds like it is possible that it's too big, maybe test with a small short file first?
Re: adding custom sound to a secret
Posted: Sun Oct 21, 2012 3:42 am
by IronMaiden
Neikun wrote:Which did it? The min distance?
the function code you gave me did it
it activates via a pressure plate as i enter the loot room and the entire song plays
)