ProtoFlux:FireOnChange: Difference between revisions

From Resonite Wiki
m overhaul
better reword of fire on local
Line 37: Line 37:
== See also ==
== See also ==


* [[ProtoFlux:FireOnLocalChange]] will fire an impulse whenever <em>any</em> user detects a change rather than a specific user.
* [[ProtoFlux:FireOnLocalChange]] will fire an impulse for <em>every</em> user that detects a change rather than a specific user.
* [[ProtoFlux:FireOnTrue]]
* [[ProtoFlux:FireOnTrue]]
* [[ProtoFlux:FireOnFalse]]
* [[ProtoFlux:FireOnFalse]]

Revision as of 08:27, 19 September 2025

Fire On Change
OnlyForUser
OnChanged
Value
Flow

The FireOnChange node will listen for changes on its input and fire an impulse for the specified user whenever there is a change in value between updates.

This can be useful for providing complex behavior for a specific user whenever a value changes that existing components do not provide.

Inputs

OnlyForUser (User)

The user that will listen to changes 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.

Value (Generic)

The value or object that should be listened to for changes.

Outputs

OnChanged (impulse)

Fires a single impulse from the specified user whenever the provided input changes value.

See also