How can I play a .wav or .ogg sound triggered by an hidden pressure plate?
Thanks.
HELP: How can i play an .ogg sound file
HELP: How can i play an .ogg sound file
If we do not end the war, the war will end us.
Re: HELP: How can i play an .ogg sound file
Code: Select all
playSound("level_up")So create a function in a lua entity
Code: Select all
function playLevelUp()
playSound("level_up")
endRe: HELP: How can i play an .ogg sound file
If i got an external file, i must mention the extention or simply the name? And, the this function will watch in the asset/sound folder automaticaly?Shroom wrote:You can find a list of these sound assets http://www.grimrock.net/modding/list-of ... ed-sounds/Code: Select all
playSound("level_up")
So create a function in a lua entity
Then add a connector from the plate, to the enity and select the function you wantCode: Select all
function playLevelUp() playSound("level_up") end
If we do not end the war, the war will end us.
Re: HELP: How can i play an .ogg sound file
You need to define a new sound asset and refer to the asset's name from you level script. Add something like this to your sounds.lua:Daght wrote:If i got an external file, i must mention the extention or simply the name? And, the this function will watch in the asset/sound folder automaticaly?Shroom wrote:You can find a list of these sound assets http://www.grimrock.net/modding/list-of ... ed-sounds/Code: Select all
playSound("level_up")
So create a function in a lua entity
Then add a connector from the plate, to the enity and select the function you wantCode: Select all
function playLevelUp() playSound("level_up") end
Code: Select all
defineSound{
name = "cool_sound",
filename = "mod_assets/sounds/cool_sound.wav,
loop = false,
volume = 0.8,
}
Code: Select all
function playCoolSound()
playSound("cool_sound")
endSteven Seagal of gaming industry