Please add bool IsPlaying() or bool SoundEnded() to IMySoundBlock.
I've been working on a grid-wide 'AI' system for my primary base which implements features like 'Safe welders', automatic lights, automatic doors, etc, and uses the emotion controller in conjunction with the sound block to give it some 'life', or responsiveness to what's happening (i.e. Uses 'shocked' face while 'Door Opening' sound plays to mimic speech, looks happy when player arrives, looks angry when targeting enemies, looks sleepy when player is in cryo, etc). Sound blocks selecting and playing sounds are a HUGE part of this, but I have no way to tell when a sound is finished playing except to check whether or not the selected sound is already the one I want or not.
I could write some kind of blocking function for the sound blocks, but the only thing I can do right now is set a standard timespan to block new sounds for, giving time for each sound to play, but if sounds I try to play have different lengths, some will end up being cut off, or not triggering, depending on how I set the timespan (because I have no way to measure the length of the sounds either).
PLEASE implement bool IMySoundBlock.IsPlaying() within the ModAPI.InGame namespace! I know not many people would use it maybe, but scripters would be able to do much more with the addition of such a simple feature. You would certainly at least make this engineer VERY happy.
Replies have been locked on this page!