ProtoFlux:Play: Difference between revisions

From Resonite Wiki
Added flux node and rudimentary explanations.
Undo revision 82774 by Decoy (talk) oops wrong page
Tag: Undo
 
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=Play And Wait
|Name=Play
|Category=Media
|Category=Media
|Inputs=
|Inputs=
[
[
{"Name":"*", "Type":"AsyncCall"},
{"Name":"*", "Type":"Call"},
{"Name":"Target", "Type":"IPlayable"}
{"Name":"Target", "Type":"IPlayable"}
]
]
|Outputs=
|Outputs=
[
[
{"Name":"OnStarted", "Type":"AsyncCall"},
{"Name":"Next", "Type":"Continuation"}
{"Name":"OnPlaybackFinished", "Type":"Continuation"}
]
]
|}}
|}}


PlayAndWait is a ProtoFlux node that plays the provided Target ([[Type:IPlayable|IPlayable]]) when * ([[Impulses|IAsyncOperation]]) is called, and then can continue with an [[Impulses|Continuation]].
Play is a ProtoFlux node that plays the provided Target ([[Type:IPlayable|IPlayable]]) when * ([[Impulses|Call]]) is called.
Play doesn't change the current [[ProtoFlux:Position|Position Output]], it essentially sets [[ProtoFlux:Is Playing|Is Playing Output]] to true.


== Inputs ==
== Inputs ==


=== * ([[Impulses|IAsyncOperation]]) ===
=== * ([[Impulses|Call]]) ===


Impulse this to play the provided Target ([[Type:IPlayable|IPlayable]])
Impulse this to play the provided Target ([[Type:IPlayable|IPlayable]])
Line 28: Line 28:
== Outputs ==
== Outputs ==


=== OnStarted ([[Impulses|AsyncCall]]) ===
=== Next ([[Impulses|Continuation]]) ===


An async impulse that impulses when the target starts playing.
Sends an impulse after * ([[Impulses|Call]]) was called and it successfully started playing.
 
=== OnPlaybackFinished ([[Impulses|Continuation]]) ===
 
Sends an impulse after the target finishes playback.


== Examples ==


== Examples ==
<gallery widths=480px heights=480px>
File:ProtoFlux_example_simple_audio_playback.webp|A simple setup that allows control of the playback of an audio clip utilizing this node along with some others.
</gallery>


[[Category:ProtoFlux:Media]]
[[Category:ProtoFlux:Media]]

Latest revision as of 21:31, 4 May 2024

Play
*
Next
Target
Media

Play is a ProtoFlux node that plays the provided Target (IPlayable) when * (Call) is called. Play doesn't change the current Position Output, it essentially sets Is Playing Output to true.

Inputs

* (Call)

Impulse this to play the provided Target (IPlayable)

Target (IPlayable)

The IPlayable to play.

Outputs

Next (Continuation)

Sends an impulse after * (Call) was called and it successfully started playing.

Examples