adding custom sound to a secret

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
IronMaiden
Posts: 17
Joined: Sun Oct 21, 2012 1:08 am

Re: adding custom sound to a secret

Post 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
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding custom sound to a secret

Post by Neikun »

Try replacing playSound("invader") with playSound("level_up") as a debug.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
IronMaiden
Posts: 17
Joined: Sun Oct 21, 2012 1:08 am

Re: adding custom sound to a secret

Post 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
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding custom sound to a secret

Post by Neikun »

Okay so we have localized the problem. it must be something wrong with the function.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
IronMaiden
Posts: 17
Joined: Sun Oct 21, 2012 1:08 am

Re: adding custom sound to a secret

Post 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,

}
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding custom sound to a secret

Post 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?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
IronMaiden
Posts: 17
Joined: Sun Oct 21, 2012 1:08 am

Re: adding custom sound to a secret

Post by IronMaiden »

woohoo that did it thanks so much!!!!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding custom sound to a secret

Post by Neikun »

Which did it? The min distance?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: adding custom sound to a secret

Post 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?
Finished Dungeons - complete mods to play
IronMaiden
Posts: 17
Joined: Sun Oct 21, 2012 1:08 am

Re: adding custom sound to a secret

Post 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 :))
Post Reply