I’m still pretty new with Unreal Engine and game development as a whole, so please excuse my ignorance if this issue is pretty obvious.
I’ve been trying to set up an “Animal Crossing” talk system that receives a string, that then splits it into each character, to then compare it to a character library/dictionary (which is just an array that has the same indexes as an array set up in a Meta Sound), that then passes all of these to a Meta Sound.
I’ve set up a for each loop that I added a delay to (so after every loop it has a delay before the next, so the audio doesn’t all play at once) which is supposed set an integer input to the Meta Sound. This appears to all work inside the blueprint itself, but as soon as it gets to the Meta Sound it seems to sporadically set the incorrect integer.
This is the correct strings that are printed from the blueprint (prints inverted to the log).
And this is what the Meta Sound prints into the Log .
Sorry my images might be a little confusing but I think I already have it set up that way.
I have a sequence node before both of these loops which I believe fires of each out in order, unless I’m mistaken and it doesn’t wait for the loop to finish.
In the screenshot it uses the initial sequencer, but I have also attempted to route it from the completed pin of the first loop and it appears to do the same thing.
I just want to clarify, that it all works within the blueprint itself. As soon as it gets to the Meta Sound through the “set integer parameter” node it begins to have the wrong integers. I can test this be adding a print node before the “set integer parameter” node and comparing it to the log in the Meta Sound.
I doesn’t wait for any time, it just goes directly to the next piece of code.
That means that it’s not going to do the top loop, then the bottom loop. It’s going to run the top loop until it sees the delay node in the macro, then start running the bottom loop. Same again with the delay node there, and jump back to the top loop.
So in fact, you have these two loops firing randomly, sort of riffle shuffled together. Would that account for the strange behavior?
Hmm, I understand that and I was sort of hoping for those two loop nodes to run in tandem as I wanted them to happen at the same time. They do appear to run this way somewhat correctly.
The characters and integers do end up lining up somewhat correctly throughout the whole thing and never stop lining up. I’m sure this is a stupid way of setting these up and there is a better way that I’m not aware of.
Regardless, it still seems the error is happening only on the Meta Sound side as it consistently prints out correctly from the blueprint. I have even removed the second delay loop and it still occurs.
Hmm alright I seemed to have worked out the issue. I noticed as I was listening to the audio that the background sounds were starting to cut in and out and thought there might be a limit to the amount of sounds playing at once. Turns out the max channels were set to 32 and when I set it higher it all begins to work…
Thanks for your help throughout this. Didn’t think ti would be something so simple.
@sapukisakeraton1 Hi, it might not be relevant for you by now, but for anyone having that issue:
You should use the SetIntParameter node that says “Target is AudioParameterControllerInterface” and not the “Target is AudioComponent” one (which was used for legacy SoundCues).
Place the Play node before the SetIntParameter node.