Template:FireOn user information: Difference between revisions

Template page
couldnt figure out syntax, sticking with this
add note about local version
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Determining the Owner of the Impulse ===
<onlyinclude>For best practice, this should never be left <code>null</code> or evaluated differently based on the user (e.g. via [[ProtoFlux:LocalUser|LocalUser]]). If this input is <code>null</code> and the node is parented under a user, then the impulse will be fired for said user. If this input is <code>null</code> and not parented under a user, or if this input evaluates differently for different users, then the impulse will <em>tend to</em> 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.</onlyinclude>
When this node is used the user who fires the impulse is determined using the following steps:
== Usage ==
# If the OnlyForUser ([[Type:User|User]]) property is not null only fire for this user.
 
# If the Node is parented under a User, fire only for that user.
For use on [[ProtoFlux:FireOnChange]] and similar nodes.
# Otherwise fire for whoever changed the value.

Latest revision as of 06:05, 21 September 2025

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.

Usage

For use on ProtoFlux:FireOnChange and similar nodes.