Sound script

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

Re: Sound script

Post 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.
Steven Seagal of gaming industry
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Sound script

Post 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
Dungeon Master and DOOM will live forever.
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Sound script

Post 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
Dungeon Master and DOOM will live forever.
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

Re: Sound script

Post 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?
Steven Seagal of gaming industry
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Sound script

Post 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
Dungeon Master and DOOM will live forever.
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Sound script

Post by Montis »

looks like you need to remove the egual sign after defineSound.
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
n0th1n9
Posts: 5
Joined: Thu Sep 13, 2012 3:16 pm

Re: Sound script

Post 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.
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Sound script

Post by LordGarth »

It says when I try to load the project. file not found modassets/sounds/scream1.wav

LG
Dungeon Master and DOOM will live forever.
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Sound script

Post 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)...
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Sound script

Post by LordGarth »

it is underscored and the file name is correct

LG
Dungeon Master and DOOM will live forever.
Post Reply