Category |
Added link for the audio clip type. |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 32: | Line 32: | ||
|}} | |}} | ||
Play One Shot is a ProtoFlux node that creates a new audio source under the provided Root ([[Slot]]) (except when ParentUnderRoot ([[Type:Bool|bool]]) is enabled) with the provided parameters. | Play One Shot is a ProtoFlux node that creates a new audio source under the provided Root ([[Slot]]) (except when ParentUnderRoot ([[Type:Bool|bool]]) is enabled) with the provided parameters. It will then wait and fire OnFinishedPlaying ([[Impulses|Continuation]]) when the audio reaches the end. | ||
== Inputs == | == Inputs == | ||
Line 40: | Line 40: | ||
Play the audio clip with the provided parameters | Play the audio clip with the provided parameters | ||
=== Clip ([[Type:IAssetProvider`1|IAssetProvider`1]]<AudioClip>) === | === Clip ([[Type:IAssetProvider`1|IAssetProvider`1]]<[[Type:AudioClip|AudioClip]]>) === | ||
The audio clip to play on the newly created sound object | The audio clip to play on the newly created sound object | ||
Line 66: | Line 66: | ||
=== Root ([[Slot]]) === | === Root ([[Slot]]) === | ||
The slot to play the audio under. The audio will not be audible if the slot is part of a disabled hierarchy. | The slot to play the audio under. The audio will not be audible if the slot is part of a disabled hierarchy. If nothing is filled in for this input, the sound will come from the node itself. | ||
=== ParentUnderRoot ([[Type:Bool|bool]]) === | === ParentUnderRoot ([[Type:Bool|bool]]) === |
Latest revision as of 22:29, 22 August 2024
Play One Shot is a ProtoFlux node that creates a new audio source under the provided Root (Slot) (except when ParentUnderRoot (bool) is enabled) with the provided parameters. It will then wait and fire OnFinishedPlaying (Continuation) when the audio reaches the end.
Inputs
* (AsyncCall)
Play the audio clip with the provided parameters
Clip (IAssetProvider`1<AudioClip>)
The audio clip to play on the newly created sound object
Volume (float)
The volume to play the audio at.
Speed (float)
The speed to play the audio at.
Spatialize (bool)
Whether the audio played will have spatialization.
SpatialBlend (float)
How spatialized the audio played will be.
Point (float3)
The point to play the audio if Root (Slot) is not provided.
Root (Slot)
The slot to play the audio under. The audio will not be audible if the slot is part of a disabled hierarchy. If nothing is filled in for this input, the sound will come from the node itself.
ParentUnderRoot (bool)
Whether to put the audio under the root of the world or not.
Priority (int)
How much priority this audio clip has, which can override others when the buffer is too full. So this audio has more priority to be played in such cases.
Doppler (bool)
Whether the audio clip played should have Doppler. What is Doppler?
MinDistance (float)
The distance the audio stops becoming louder when getting closer to the source.
MaxDistance (float)
The max distance the audio can be heard from until it is inaudible
Rolloff (AudioRolloffMode)
The AudioRolloffMode the audio created should use.
DistanceSpace (AudioDistanceSpace)
The AudioDistanceSpace the audio created should use.
MinScale (float)
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
MaxScale (float)
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Group (AudioTypeGroup)
What AudioTypeGroup this node is in.
LocalOnly (bool)
Whether this audio should only play locally for the user that fired the node.
Outputs
OnStartedPlaying (AsyncCall)
When the audio clip has successfully started playing
OnFinishedPlaying (Continuation)
The the audio clip has finished playing
Audio (AudioOutput)
The Audio Output component created to play the audio. The Get Slot node can be used to get the created slot for the one shot. This will only have a value during the OnStartedPlaying (AsyncCall) impulse.
Examples
-
Example of a Play One Shot And Wait being used in a booper to prevent spam.