This is my sound BP for when you hold shift and it works as intended. You press shift and it fades in the sound, you let go and it fades out but if you press shift in the middle of it fading out it cuts straight back to the begining because of the start time node, i have looked around and could not figure out how to make it start where it left off so its a smooth ramp up and cool down sound. any help?
I believe this is due to the start time node being set to 0.0 in the fade in call.
Perhaps the way to fix it is to track how long the sound had been playing for and set the start time node to that.
Although I canāt be sure as the code comment for FSoundParseParameters is only partially written for some reason lol.
float Pitch;
float HighFrequencyGain;
// How far in to the sound the
float StartTime;
// At what distance from the source of the sound should spatialization begin
float OmniRadius;
So we know that StartTime is āhow far into the sound theā heh.
I would give it a shot anyhow.
How would i do this with blueprints?
Create a sound cue and then you can get and set the time on the cue
You need to track how long it was since you started playing the original sound. I havenāt tested this but in theory you can create a āSound Startedā float and set it to Delta time. When finished, subtract a new Delta time to find the duration, then add the fade out value, set this ad a new āStartTimeā float and plug that into the StartTime slot on the Fade In node. Hopefully this works for you.