Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Equal randomization for sound objects

+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?

 

asked Apr 15, 2014 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.

answered Apr 16, 2014 by Bernard R. (Audiokinetic) (35,110 points)
selected Apr 22, 2014 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
...