ProtoFlux:Is Disposed

From Resonite Wiki
Revision as of 04:40, 23 May 2024 by AmasterAmaster (talk | contribs) (Whoops, needs it's own example file.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Is Disposed
Element
*
Elements

The Is Disposed node takes in a worker world element and returns if that element was disposed from the world. Destruction of the slot prevents the result from changing, as by the time the slot is gone, it is too late. There is however a method to check if something did get disposed, see the examples below.

Inputs

Element (Worker)

The worker world element in question.

Outputs

* (bool)

Returns if this element was disposed in this world.

Examples

There is a certain setup required to detect when a slot gets disposed, here is what you need and why:

With this setup, and when the target slot is destroyed (and there is no longer any references to it), the DynamicReferenceVariable component will still have it stored on its field, showing the old ID along with it. This in turn makes the IsDisposed set to true.