MetaSounds - Help needed! (EDIT: Solved)
Hey everyone,
I’m quite new to MetaSounds and haven’t managed to solve an issue I’m having, so I’m wondering if anyone here can point me in the right direction.
What I want to do is to have a repeating trigger which will randomly pick a new trigger “period” value for itself every time it is triggered. So for example on first trigger it could decide that it won’t trigger again for 0.5 seconds, and on second trigger it might decide to wait 3 seconds, etc.
However, I can’t seem to find a way to do this because anything I try brings up the message “Connection causes loop”. Unfortunately I can’t think of any ways to do it without having a loop!
The main thing I have tried is to start with a “Trigger Repeat” module. Then I connect its “RepeatOut” socket to trigger a “Random (Float)” module. Then I connect the output of that to a “Float to Time” module and attempt to connect that back to the “Period” of the “Trigger Repeat” module but this is when the error is shown.
Or alternatively if I can cause an envelope to trigger another envelope when it is done (repeating infinitely) then that might be another method to achieve what I want, though I’m also unsure if you can do that without causing a loop.
Thanks!
EDIT:
With a bit more Googling I found a fix for this. Will leave the post up in case it is useful to anyone
It turns out you can avoid encountering the “Connection causes loop” errors by using a “Get Delayed” of a variable, rather than a standard “Get”. You can find the delayed version by either holding Alt while dragging it from the variables menu, or by searching for “Delayed” and then the name of the variable you want. The “Get Delayed” effectively waits for a frame before accessing the variable. For some reason this seems to not be mentioned anywhere in the UE documentation, so I instead learned via digging around in forum posts 🙃