plotscript, testsound, begin
if (key is pressed (key:shift)) then (
play sound (6))
end
The problem is that, when shift is held down, the sound only plays once, then after the sound is done playing, it starts over again. I want the sound to play over itself for every tick that shift is held down.
Hmm... maybe if you have the sound imported in multiple slots and have the script set up to play the second, third, etc. if the first(/second, etc.) copy of the sound is currently playing? I know I remember a "sound is playing" command, anyway, though I can't recall if I've used it for anything so I'm not sure this will work.
FYS:AHS -- Working on Yagziknian NPC walkabout sprites
plotscript, testsound, begin
if (key is pressed (key:shift)) then (
play sound (6))
end
The problem is that, when shift is held down, the sound only plays once, then after the sound is done playing, it starts over again. I want the sound to play over itself for every tick that shift is held down.
Might do what you want? If it doesn't, I've used Fnrrf's multiple copies of the sound trick and it usually works pretty good. You'd want to use SoundIsPlaying like he said to check if Sound6 is already playing and play Sound7 instead, and if Sound 7 is playing play 8, and so on until you have a satisfying amount of overlap.
The "preempt" argument doesn't allow playing a sound multiple times at once.
You will unfortunately need to import multiple copies of the sound effect.
This is something I would like to change at some point, but it's not a high priority.