Forum rules - please read before posting.

Using sounds from Wwise in Adventure Creator

Hi there, I´m working on a prototype adventure demo for my students, a simple adventure, for them to build a complete Sound Design. We are using Wwise middleware.

In general we haven´t had much trouble, except when trying to add Events to the Player prefab; we have built some random containers for the footsteps, but cannot spot where on earth do you play them within de Player script; you do initialize the AudioSource in the Awake() function, but nothing else.

Where do we place the AkSoundEngine.PostEvent("Pasos_Jugador", gameObject)?

Comments

  • Found something... I used the FootstepsSounds.cs and adapted it to include calls to AkSound, and attached it to the Player prefab. But I guess there should be something more straightforward

  • Welcome to the community, @arsys.

    AC has its own custom event system, which provides script hooks for common tasks such as a character speaking or moving. It may be possible that the introduction of an "OnPlayFootstep" event may prevent you from having to modify an AC core script.

    If you can elaborate on what steps you took to adapt FootstepSounds to rely on AkSound, then I can try to determine if this would be the case.

  • Thanks for your reply... AkSoundEngine is a call to Wwise sound engine (AudioKinetics).

    I simply added the FootstepsSounds script as indicated, in the root of the Player. Being a simple demo in First Person, the Player has no avatar and therefore no animations. So I guess I could have used a new empty script as well.

    Wwise manages sounds independently through its middleware, so the code in FootstepsSounds is not necessary. In the case of footsteps, we created several random containers with sounds in different surfaces, joined in a switch container that triggers the right sounds when the Player walks through the different surfaces

  • edited September 2019

    Sorry, but I'm not following what it is you're asking for, here. Are you now using an independent script system?

    The FootstepSounds component has two modes - one relies on animation events, and the other just plays clips at set intervals. You can still use this latter mode without character animation.

    It's also possible to change its assigned AudioClip assets at runtime using the Sound: Change footsteps Action, which can be placed in an ActionList asset so that it can be run from any scene.

    I'll see about adding an event hook for footstep audio audio playing - both via this component, and the character script's built-in method. This way, you could feasibly silence the "regular" AudioSource component and assign this AudioClip to your own system.

  • I was simply asking for directions to hook AudioKinetic source to AC... when I stumbled upon FootstepsSounds script. I need to read the documentation carefully, but for now I managed to play AK Footsteps containers without much trouble.

    When integrating Wwise into a Unity project, it takes control over the audio engine. So the rest of sounds in the project are silenced. It happened the same with Enviro, which I use for time of day and climate control.

  • Thanks for the clarification.

    AC relies on Unity's own audio system for sound playback - i.e. AudioSources and AudioMixers.

    The next AC update will incorporate the above-mentioned OnPlayFootstepSound event so that you can more easily hook in a custom audio system to character footsteps.

    Events are a way of hooking up custom code to common AC tasks without editing AC's own scripts. A tutorial on their use can be found here.

    Music and Ambience also have dedicated event hooks that you can use to do the same thing for tracks played with the Sound: Play music and Sound: Play ambience Actions. For more, see the end of the Manual's "Interaction scripting" chapter.

    I shall see how feasible it would be to add similar events for AC Sound playback in general, so that audio can be more widely overridden in this way.

  • Thanks for the assistance! I´ll wait for the OnPlayFootstepsSound anxiously

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.