Page 1 of 1

Sound Management In Elements

Posted: Sun Feb 27, 2022 12:57 pm
by SLAPPYHAPPY2000
So, I am doing some experiments with sound in custom elements, and I am having a bit of trouble achieving what I want.
I want to make it so that a custom element plays a sound once upon creation, and then nothing more after that.
I've achieved this in multiple ways, but with a bunch of undesired side effects:
Setting the actual element sound to "changing" will play the sound upon creation, but it will also play it upon changing to another element, which I do not want.
Setting the previous element sound to "changing" will play the sound upon the element's creation, but I can only use this method if the pervious element is there from the start, otherwise the sound will play at undesired moments.
Just setting the element's sound puts it on loop by default, requiring me to make unwanted alterations to the sound or do some shenanigans to get the precise moment at which the element should change and the sound should cut off. Setting the loop mode of the sound to false makes it just not play at all.
Is there something I'm missing? If not, I think having a sound play just like a looping sound except once is a feature that should definitely be added to the game :lol:
Forgive me if I was not clear enough with my explanations; I know my wording was a bit rough and some parts don't make sense, but I don't really know the best way to describe my situation.

Re: Sound Management In Elements

Posted: Mon Feb 28, 2022 11:03 am
by Holger
Hi, I think I understand what you described, and it seems to make sense to me.

Especially the note about "changing" seems very reasonable, being able to play a sound when a CE was created, but not playing it when it was changed later to some other CE. It's some time ago that I had a look at it, and to be honest I would have expected that this is possible, but it might be not.

I'll have a look at how these options work, and if it should already be possible somehow, or if there's room for improvement!

Re: Sound Management In Elements

Posted: Sun Mar 13, 2022 4:24 pm
by Eizzoux
I think for now you can just make a mid-element which looks like rather empty space or as the element you want to have a creation sound, make it last for 0 frames (or 1 frame, technically), which will have the changing sound as the creation sound instead