Random Audio Node Player
by SanderVanhove
Random Audio Node Player
This Godot Engine plugin plays a random audio stream child node.
Ideal if you want control over all the settings per audio stream, like volume, audio bus, pitch, etc. Check the alternatives for other options.
Usage
- Add the
RandomAudioNodePlayer
to your scene. - Add
AudioStreamPlayer
,AudioStreamPlayer2D
orAudioStreamPlayer3D
nodes as children. - Call
play()
on theRandomAudioNodePlayer
.
Features
- Play random AudioStreamPlayer(2D/3D) nodes.
- Doesn't play the same node twice.
- Interface is similar to an AudioStreamPlayer.
Class signature
Signals
-
finished()
Emitted when one stream isfinished
. -
finished_all()
Emitted when all streams arefinished
and nothing is playing.
Property Descriptions
-
playing: bool (set_playing, get_playing)
Iftrue
, a child audio stream node is playing -
autoplay: bool (set_autoplay, get_autoplay)
Iftrue
, audio plays when added to scene tree. -
paused: bool (set_paused, get_paused)
Iftrue
, the playback of all child audio streams are paused.
Method Descriptions
-
play: void
Plays a random audio stream node that is a child of this node. -
stop: void
Stop all the playing audio stream nodes. -
get_playing_nodes: Array[Node]
Returns all the playing audio stream nodes.
Alternative
- Random Audio Stream Player: If you just want to play random audio streams.
- RandomSound: Similar to this one, but with channels.
Download
Support
If you need help or have questions about this plugin, please contact the author.
Contact Author