Listen for the sound of a potion being drank? GetSoundPlaying??
Sounds like a good idea, but either I'm not using the function correctly or there is a problem with it. I made a debug message, but the script never triggered. I tried the following:
if player.getsoundplaying "NPCHumanSwallow" > 0 ; NPCHumanSwallow is the sound effect ID in the CS for the 'drink potion' sound
if player.getsoundplaying "*swallow*" 150 > 0 ; tried with a radius setting and a wild card since the sound effect points to a directory with 3 different sounds
if getsoundplaying "*swallow*" > 0 ; tried without specific reference
The script is a quest script that runs at 0.1 fquestdelaytime, the sound effects have ~0.4 seconds duration so it should be enough time to return true.
Is it maybe a problem that the sound effect in the CS points to a directory with three random sound effects and not a single wav file? Is there anything wrong with the way I use the function?