# How to randomise where to start playing ambient sounds?

**URL:** <https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029>\
**Category:** Audio\
**Tags:** random, unreal-engine, Blueprint, question\
**Created:** [June 21, 2023, 6:50am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029 "2023-06-21T06:50:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![orangeboy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orangeboy/32/715051_2.png) [@orangeboy](https://forums.unrealengine.com/u/orangeboy)\
**Post date:** [June 21, 2023, 6:50am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/1 "2023-06-21T06:50:30Z")

</div>

I tried the method below, but  
but the start point is not randomised.  
Do you know how to fix it?

 ![2023-06-21_15-42-07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/4/544442a43e61fea9254ebbab196f68d3d3699efe.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 21, 2023, 8:38am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/2 "2023-06-21T08:38:21Z")

</div>

What is AudioK? You have to use the length of the sound you’re playing…

---

<div class="post-metadata">

**Author:** ![orangeboy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orangeboy/32/715051_2.png) [@orangeboy](https://forums.unrealengine.com/u/orangeboy)\
**Post date:** [June 21, 2023, 9:17am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/3 "2023-06-21T09:17:18Z")

</div>

AudioK = Audio Component

 ![2023-06-21_18-14-48](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/a/a3a64cfbbb5ef7a6a340eb92582ff22100e19db9.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 21, 2023, 9:22am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/4 "2023-06-21T09:22:53Z")

</div>

Right, but not the same sound cue?

You have to get the length from AudioK.

---

<div class="post-metadata">

**Author:** ![orangeboy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orangeboy/32/715051_2.png) [@orangeboy](https://forums.unrealengine.com/u/orangeboy)\
**Post date:** [June 22, 2023, 12:52am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/5 "2023-06-22T00:52:12Z")

</div>

Audio K (AudioComponent) cannot be connected to the Random Float in Range function.

 ![2023-06-22_09-50-42](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/e/49edf19964b0d87c62879ec040f0e927743805ae.png)

![2023-06-22_10-10-59](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/8/6b8832d0b710f36ecbee7b3f0b51ecaacd175b53.png)

---

<div class="post-metadata">

**Author:** ![orangeboy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orangeboy/32/715051_2.png) [@orangeboy](https://forums.unrealengine.com/u/orangeboy)\
**Post date:** [June 26, 2023, 2:51am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/7 "2023-06-26T02:51:51Z")

</div>

Only animation resources can be connected.  
Audio resources cannot be connected.

![2023-06-26_11-50-30](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/4/09400e38c0937d11149d530526aa44b235f8ede2.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 26, 2023, 5:45am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/8 "2023-06-26T05:45:42Z")

</div>

You have to make the node by dragging from the wave reference.

---

<div class="post-metadata">

**Author:** ![orangeboy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orangeboy/32/715051_2.png) [@orangeboy](https://forums.unrealengine.com/u/orangeboy)\
**Post date:** [June 27, 2023, 1:52pm UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/9 "2023-06-27T13:52:57Z")

</div>

Do you mean sound wave in object type?  
I can’t get this to work either

 ![2023-06-26_22-52-14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/8/7b85d25d4459874d00ea749f649f9161f645400c.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 27, 2023, 2:16pm UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/10 "2023-06-27T14:16:35Z")

</div>

Sorry, try this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/6/3a6181e4c804410cad8876f4be093bec0555021a.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/4/9047fc46ebf65d0ba0ddad2a004396a8b60a2d6c.png)

---

<div class="post-metadata">

**Author:** ![orangeboy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orangeboy/32/715051_2.png) [@orangeboy](https://forums.unrealengine.com/u/orangeboy)\
**Post date:** [June 28, 2023, 1:02am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/11 "2023-06-28T01:02:09Z")

</div>

Wow~  
Creating it as a SoundWave object solves the random start point problem.  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![NeonWizardGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neonwizardgames/32/726895_2.png) [@NeonWizardGames](https://forums.unrealengine.com/u/NeonWizardGames)\
**Post date:** [June 28, 2023, 4:05am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/12 "2023-06-28T04:05:44Z")

</div>

You may want to stick to using “Sound Cue’s” in your project and avoid using wav. when possible, as they allow for creating and manipulating extra settings on the sound file. All you have to do is return the sound wav. object from the Audio Component, then you can read the info of the wav. file in the soundcue. Hope it helps, if you already solved the problem then you can ignore this 🙂

 ![randomSoundCueStartPoint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/2/e021e3df0b3da25d768bf78646f566aca01e8bd1.png)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 28, 2023, 4:06am UTC](https://forums.unrealengine.com/t/how-to-randomise-where-to-start-playing-ambient-sounds/1206029/13 "2023-07-28T04:06:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
