It looks like you're new here. If you want to get involved, click one of these buttons!
<<set $Sounds = {
Map: {Open: 0, Close: 0},
Lighter: {Open: 0, Close: 0, Strike: 0},
}>>
<<set $Sounds.Lighter.Open = "Data/Audio/LighterOpen.wav"; $Sounds.Lighter.Close = "Data/Audio/LighterClose.wav"; $Sounds.Lighter.Strike = "Data/Audio/LighterStrike.wav">>
Using <<playsound $Sounds.Lighter.Open>> works fine, but the thing that I want to be able to do is play a sound once after hitting a link like so -
[[Open Lighter|Audio Test][playsound $Sounds.Lighter.Open; $Lighter = "Open"]]
If L's macro just wasn't coded to do this, then is there a possible work around to achieve the same effect? If not then what am I doing wrong? (I'm using SugarCube v0.9.9)
Comments
In this case, since you're using SugarCube, you can simply use the
<<click>>
macro. Try this:Also. There shouldn't be a need to have your initialization separated as you've shown. You can populate the objects with your sound files in one go. For example:
Also. There shouldn't be a need to have your initialization separated as you've shown. You can populate the objects with your sound files in one go. For example:
I feel so stupid now, I have no clue why I didn't just use the click macro. Thanks again Exile.