Sound Management In Elements

Stuck at a level? Need help with R'n'D or anything R'n'D related? Post here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
SLAPPYHAPPY2000
Posts: 110
Joined: Wed Jun 03, 2020 10:27 am

Sound Management In Elements

Post 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.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Sound Management In Elements

Post 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!
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Sound Management In Elements

Post 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
𒈟
Post Reply