This won’t be useful on the issue of delayed variables because footfalls don’t need them. I may have another example I’ll post below on the use of those but I don’t think it will add to the graph posted above.
For Footfalls, go through this tutorial and the one it mentions at the top prior to doing so. This tutorial will let you set up your Physics surfaces and create a TMap that will let you fire a ray down to where the player is walking and return the correct metasoundpreset / metatsoundsource to play. We took this a little further and did this from the animblueprint of AIs using animnotifies. Players we handle separately so the footsteps aren’t counted in the channel list (it saves a channel to have players footsteps included in a 2d sound manager MetaSound).
You asked for the footstep blueprint and presets so here they are. There is nothing particularly interesting in them. The first two are what is used from animblueprints for the AIs, the third leverages those in a rather clunky way so players footsteps are incorporated in my 2d sound manager.
Basic Footfall MetaSoundSource, this serves as the template for the presets:
Example Preset for Footfalls. This one is grass. We set 6 waves in an array and randomly pick which to play when this gets triggered by the animnotify in animblueprint. You can see it’s using the above basic MetaSoundSource. It was generated by right click in content browser on the above MSSource and selecting to create a preset. The only thing referenced when using it are the presets. If you set up presets things like this, be sure to include an Attentuation class, a submix class, and you may want to put a priority and limit concurrency for the presets involved. These are under the Source button (thanks to the forum user who told me to look there).
As I mentioned, player is handled differently and there was no elegant way to do it other than have a set of enums which are used when it’s called. The only interesting thing is that I use the AI’s footfall presets in this MetaSoundSource so I automatically get the right waves for the enum. In this case, Snow is 0, Grass 1 etc. Ignore the stuff to the right, that is for players weapon sounds which again are included in the 2D manager to save channels. What is nice is I can just change the top graph if I want to alter how the footsteps work and both AIs and Player will automatically be impacted.
As to the delayed variable question, here is a few places I’m using it. It was a life saver. I think the example @lantz.anna_1 posted is superior to show the same thing because it’s clean and this is a mess, but this shows how complex use can do many different things. If you see the bottom right variable LoopDone, it’s set by OnNearlyFinished, which when used in the upper left corner, starts things to play the next CombatLoop (the line running down to the bottom left). Suffice it to say, when you try to connect a pin and it refuses to let you due to a loop, that is most likely where you want to use a delayed trigger variable.
BTW, this is way more complex than most people would care to use. It’s so complex because it toggles between idle and combat playing an idle intro and multiple idle themes and a combat intro and multiple combat themes and moves between them on even measures. That’s usually not important to people. It’s also not doing random selection of themes, they are composed to play sequentially. This isn’t a graph to be proud of . The way I should have done it is compose the intros so they and the themes were one long loop. Most games seem to do this and just start the idle or combat over in their entirety. That would be a cleaner approach.
This probably should be it’s own thread. .