ProtoFlux:Fire On Change: Difference between revisions

From Resonite Wiki
No edit summary
No edit summary
Line 19: Line 19:
=== OnlyForUser ([[Type:User|User]]) ===  
=== OnlyForUser ([[Type:User|User]]) ===  


is the one "watching" for changes, if the Value (Generic) is localized and only changes for the OnlyForUser User, then it will send out a impulse for every change vs someone else who wouldn't see those changes.
Is the User "watching" for changes, if the Value (Generic) is localized and only changes for the OnlyForUser User, then it will send out a impulse for every change vs someone else who wouldn't see those changes.
 
{{FireOnUserInformation}}


=== Value (Generic) ===
=== Value (Generic) ===

Revision as of 01:46, 18 February 2024

Fire On Change
OnlyForUser
OnChanged
Value
Flow
Using this node with Local User or no user input may cause undesired outcomes.

Fire On Change Nodes will only fire if the OnlyForUser (User) provided has seen the value on their local machine change.

When this node triggers from the OnlyForUser (User) provided it can be used to execute code that requires the impulse be from a specific user. This is useful for things like:

  • changing world properties
  • physics
  • cloud variables
  • other Local User sensitive nodes.

Inputs

OnlyForUser (User)

Is the User "watching" for changes, if the Value (Generic) is localized and only changes for the OnlyForUser User, then it will send out a impulse for every change vs someone else who wouldn't see those changes.

Determining the Owner of the Impulse

When this node is used the user who fires the impulse is determined using the following steps:

  1. If the OnlyForUser (User) property is set to ProtoFlux:Local User, fire for all users in a session.
  2. If the OnlyForUser (User) property is not null only fire for this user.
  3. If the Node is parented under a User, fire only for that user.
  4. Otherwise fire for all users in a session.

Value (Generic)

The value or reference that OnlyForUser (User) should watch for changes on their client.

Outputs

OnChanged (impulse)

Will fire a single impulse from the OnlyForUser (User) input every time the value provided changes.

Examples

See Also