I started working on a custom dungeon and added a custom sound to it.
To do so I added my wav file in the sounds folder, and edited the sounds.lua file in the "mod_assets\scripts" folder and added :
Code: Select all
defineSound{
name = "evil",
filename = "mod_assets/sounds/evil.wav",
loop = false,
volume = 1,
minDistance = 30,
maxDistance = 32,
}
Code: Select all
function evil()
playSound("evil")
end
I don't know if this is normal or not... Anyway I managed to hear my sound in preview mode.
But, after exporting my dungeon I tried it in the game and got that message :
Here is the error log :
SpoilerShow
[string "SoundSystem.lua"]:0: Seek failed on file mod_assets/sounds/evil.wav
stack traceback:
[C]: in function 'load'
[string "SoundSystem.lua"]: in function 'defineSound'
mod_assets/scripts/sounds.lua:5: in main chunk
[string "Dungeon.lua"]: in function 'import'
mod_assets/scripts/init.lua:13: in main chunk
[string "Dungeon.lua"]: in function 'loadInitFile'
[string "GameMode.lua"]: in function 'loadDungeon'
[string "GameMode.lua"]: in function 'newGame'
[string "GameMode.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'update'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
OS Version 6.1
OEM ID: 0
Number of processors: 8
Page size: 4096
Processor type: 586
Total memory: 6068 MB
Free memory: 3347 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: NVIDIA GeForce GTX 460M
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: NVIDIA GeForce GTX 460M
State flags: 00000000
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
stack traceback:
[C]: in function 'load'
[string "SoundSystem.lua"]: in function 'defineSound'
mod_assets/scripts/sounds.lua:5: in main chunk
[string "Dungeon.lua"]: in function 'import'
mod_assets/scripts/init.lua:13: in main chunk
[string "Dungeon.lua"]: in function 'loadInitFile'
[string "GameMode.lua"]: in function 'loadDungeon'
[string "GameMode.lua"]: in function 'newGame'
[string "GameMode.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'update'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
OS Version 6.1
OEM ID: 0
Number of processors: 8
Page size: 4096
Processor type: 586
Total memory: 6068 MB
Free memory: 3347 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: NVIDIA GeForce GTX 460M
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: NVIDIA GeForce GTX 460M
State flags: 00000000
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008