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.

+1 vote

For my shooting system I created a simple set of sound objects for every gun:

  1. Loop
  2. Lastshot

In game, we trigger loop Play-event and then it's time to stop shooting, we trigger corresponding Stop-event to stop the loop sound and then play lastshot sound.

Now I want to add some pitch randomization to that loops, but I can't found a simple way to set the same pitch (randomized every time the shooting starts) for their lashots. 

What is the most optimal way to do so?

 

in General Discussion by Mikhail P. (210 points)

1 Answer

+1 vote
 
Best answer

Have the following hierarchy:

  • Actor-Mixer object
    • Loop
    • LastShot
 

In your Play-event,

  • Add a Set Pitch Action at the beginning, on the Actor-Mixer object
  • Set the Randomizer on the Set Pitch Action value
  • Play Loop

In you Stop:

  • Stop Loop
  • Play LastShot

This way the set pitch random will be executed once per play event, and will be applied to both sounds.

by Bernard R. (Audiokinetic) (35.8k points)
selected by Mikhail P.
I set Pitch randomizer in "Play" action, but lastshot still sounds without pitch shifting at all. Of course, we trigger both sounds on the same Game Object. Looks like Set Pitch Action in our case works for one particular sound object (loop), but not for Game object (loop + lastshot).
See my updated answer
...