menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

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

 

dans General Discussion par Mikhail P. (210 points)

1 Réponse

+1 vote
 
Meilleure réponse

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.

par Bernard R. (Audiokinetic) (35.8k points)
sélectionné par 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
...