Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

Hello all. I've been working on replacing all the audio in the 3d Game Kit through Wwise integration and am fairly new to coding. I am working on the sounds of an energy grenade exploding and bouncing. In the original script for the grenade they declare 2 RandomAudioPlayers:

public RandomAudioPlayer explosionPlayer;

public RandomAudioPlayer bouncePlayer;

Then later in the script the Explosion function starts of like this:

public void Explosion() {

if (explosionPlayer) {

explosionPlayer.transform.SetParent(null);

explosionPlayer.PlayRandomClip();

} .....

I am attempting to replace these lines as follows, first I declare 3 things at the beginning:

public AK.Wwise.Event aKExplosion;

public AK.Wwise.Event aKBounce;

private AkGameObj grenadeLocation;

Then later I replace the original lines in the function with:

public void Explosion() {

if (grenadeLocation) {

grenadeLocation.transform.SetParent(null);

aKExplosion.Post(gameObject);

} .....

I'm not getting any errors in the script but also no sound from the explosion... I'm not sure AkGameObject is the correct class to use here but so far I have not come up with any better ideas and have hit a wall. Any help or suggestions would be greatly appreciated. Also let me know if I should elaborate on any aspect. Thanks!!

in General Discussion by Jon S. (100 points)

Please sign-in or register to answer this question.

...