Randomising pitch?

To make the sound effects less annoying, I randomise the pitch like this:

enemy_hit_sound.pitch_scale = randf_range(0.7, 1.3)

Just checking is this the only way to do this? Thinking what’s the best way to do in for larger projects, I guess I’ll create a function that randomises before it plays. I’m interested in a better way to do this!


looks good to me, never thought of doing that just to change it up a little.
nice one :slight_smile:

1 Like

Thank you! It was fun to play with sound pitch in code.

1 Like

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

Privacy & Terms