I'm in need of some direction on making a NPC give a demonsration

Hello,

I was developing a game in Unreal engine 4 several years ago, but time and circumstance got in my way and I’ve lost most of my Unreal BP skills.

I’m trying to make a simple VR Demo program.

My goal is to have a NPC walk up to the FP player and give them the spiel on a Virtual Reality appliance.

I cannot figure out how to have my NPC walk and talk at the same time (never mind chew gum!!!).

I’ve tried using animation notify from within the walk animation to start him talking and finish the talking but I think I’m using the wrong audio components to do that.

Can anyone direct me to some good videos on now do to this. I’ve watched at least half a dozen so far, but all of them give pieces that don’t seem to fit toether.

Any help is appreciated and thank you!!!

Arthur

Hey @Lord_Caine! Welcome back to the Forums!

A few questions:

  • Are you having trouble having your character play a talking animation while walking?
  • Or, are you having issues with the audio playing while your animation is playing?
  • Would you mind sharing your current blueprints so we can get a better understanding of what you’ve got going so far?

Any additional information you can provide will be a big help in solving your problem!

Hi @Quetzalcodename ,

Actually both.

Originally I was able to get the NPC to walk and talk by firing off a play2 sound prior to a walk to target. In the walk animation (with gestures) I fired off a notify at the end of the animation to move to the next animation, but I ran into issues with either the audio or the animation getting out of sync.

I tried playing a sound with notify but then the notify sounds started stacking up and repeating like they were in a loop.

My blueprints are a mess right now, but here is my starting Animgraph. This is just the start. I expect it will get a bit more complex as I move along, but since this is a demo and not a game the animgraph will be serial with no parallel branches so that should make things easier

Thank you so much for your help!

Arthur

Hey @Lord_Caine!

So starting with your sounds, what does your blueprint for that look like? Have you tried using a do once node for your event? That should prevent your audio from running again until you reset the node in question.

Here is a great non Epic affiliated demonstration of the concept:

WTF Is? The Do Once Node

Now for your animations, I see that you have to cycle all the way back through your animation states to get to walking again. What I suggest instead is to blend animations using layered animations.

Essentially, you can take the lower half of your walking animations, the upper half of your talking animation, the lower half of your walk animation, and blend them together to create a new walking and chewing gum animation. Here is a great non Epic affiliated example.

Merging Animations - #13 Unreal Engine 4 Animation Essentials Tutorial Series

I hope the above solution works for you!

Hi Q!,

Thanks for all of that. I finally got it working by using audio components and the blueprint events that work off of those. I haven’t used the blended animation tutorial yet, but that’s next on my list!

Thanks again!

Arthur