ProtoFlux:FireOnFalse: Difference between revisions

From Resonite Wiki
No edit summary
across updates
 
(15 intermediate revisions by 4 users not shown)
Line 13: Line 13:
|}}
|}}


{{Template:Basic Fire On Information|Fire On False|turn <code>False</code>|the OnlyForUser ([[Type:User|User]]) provided}}
The '''FireOnFalse''' node will [[Type:IExecutionChangeListener`1|listen]] for changes on its input bool and fire an [[impulses|impulse]] for the specified [[user]] whenever the input turns from <code>True</code> to <code>False</code> across [[update|updates]].


{{Template:Note|Using this node a [[ProtoFlux:Local User|Local User]] node can cause performance issues as every user in the session will output impulses. Instead use a [[ProtoFlux:Local Fire On False|Local Fire On False]] node. |danger}}
== Inputs ==


== Inputs ==
=== OnlyForUser ([[Type:User|User]]) ===


=== OnlyForUser ([[Type:User|User]]) ===
The user that will listen to the boolean and fire the impulse.


The [[Type:User|User]] that should monitor the provided Condition ([[Type:Bool|bool]]) every game tick.
{{FireOn user information}}


=== Condition ([[Type:Bool|bool]]) ===  
=== Condition ([[Type:bool|bool]]) ===


The [[Type:Bool|bool]] that should be monitored by the provided OnlyForUser ([[Type:User|User]]) every game tick.
The bool that should be listened to for changes.


== Outputs ==
== Outputs ==


=== OnChanged ([[Impulses|Call]]) ===
=== OnChanged ([[Impulses|impulse]]) ===
 
Fires a single [[Impulses|impulse]] from the specified user whenever the provided input turns from <code>True</code> to <code>False</code> across updates.
 
== See also ==


Fires when the provided OnlyForUser ([[Type:User|User]]) sees the provided Condition ([[Type:Bool|bool]]) turn false.
* [[ProtoFlux:FireOnLocalFalse]] will fire an impulse for <em>every</em> user that detects <code>False</code> rather than a specific user.
* [[ProtoFlux:FireOnTrue]]
* [[ProtoFlux:FireOnChange]]


[[Category:ProtoFlux:Flow]]
[[Category:ProtoFlux:Flow]]
[[Category:Listener nodes]]

Latest revision as of 08:48, 19 September 2025

Fire On False
OnlyForUser
OnChanged
Condition
Flow

The FireOnFalse node will listen for changes on its input bool and fire an impulse for the specified user whenever the input turns from True to False across updates.

Inputs

OnlyForUser (User)

The user that will listen to the boolean and fire the impulse.

For best practice, this should never be left null or evaluated differently based on the user (e.g. via LocalUser). If this input is null and the node is parented under a user, then the impulse will be fired for said user. If this input is null and not parented under a user, or if this input evaluates differently for different users, then the impulse will tend to be fired for the first user that sees the change in value. This is usually the one who caused the change in the first place. This could cause inconsistent behavior unless carefully managed. If the desired behavior is for an impulse to fire by every user that detects a change for them locally, then use the local version of this node, which is linked at the bottom of the page.

Condition (bool)

The bool that should be listened to for changes.

Outputs

OnChanged (impulse)

Fires a single impulse from the specified user whenever the provided input turns from True to False across updates.

See also