It has been a pretty rough couple of evenings working on this project. The goal yesterday was to create an FMOD session, load in some basic footstep sounds and simply get them working in game. It all sounds very simple, and the task was made even easier by the fact that I was using very quickly edited, pre-made footstep sounds (I intend to record custom ones for this project soon), and a simple blueprint just to test that the audio worked in game. This was just meant to be a testing phase to ensure things were set up correctly.
Then there were animation problems.
I am using the FPS template that Epic have provided for when you start a new project. It includes the run and jump animations that I require for the game and, most importantly, gives me the pre-built first person camera. It does also include the model arms and weapon, but I have disabled those for this project.
So the project was supposed to go like this:
– Create animation notifies on the run animation to reference when to play the audio
– Build FMOD banks into the game
– Use below pictured script to trigger the single set of footsteps
Very simple stuff until it doesn’t work!
I found the event file itself within the content folder of the project and made sure that the sound came through there, which it did. Then I tried the same script but just playing 2D audio event, and that didn’t work. No luck on the internet as demos just seemed to work as they should do. But then after chatting with some friends and not getting anywhere, I started applying notifies onto all animations included in the template out of desperation. And that is when it happened. Somewhere along the line of creating the project and making this blueprint, the run animation was no longer functioning when you moved. The model was now stuck on ‘Idle’. I guess I could have made that work if it was just the case of the idle animation taking over the run animation (although it would have bugged the hell out of me), but the idle animation was also playing when the character was actually idle. The footsteps were now playing constantly regardless of whether you moved or stood still!
As I am completely inexperienced with these things, I went through a few stages of kind of figuring out what I was going to do next, with one solution including teaching myself how to attach some of the larger library of free animations to a free model in a blank project (I’m still interested in this, so I’ll save that for a rainy day). I migrated the map I had created into two new projects with the thought of one hell of a lot of work coming up, but then I had an idea:
– why not create another FPS template, and do nothing but attach the audio?
Long story short on that one is that it worked. Disabled the arms, gun, and ‘bullets’ and it still works. So I am back on track now and I will be adding in audio all of this week to hopefully complete the first section of the game. Looking forward to it!