ProtoFlux:Find Parent By Tag

From Resonite Wiki
Revision as of 19:31, 10 February 2024 by 989onan (talk | contribs) (Added Find Parent By Tag ProtoFlux Node Page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Find Parent By Tag
Instance
*
Tag
SearchDepth
Slots

Finds a parent object above Instance (Slot) that matches the given Tag (String).

Using this node to search the entire parent hiearchy in ProtoFlux that tries to evaluate every frame will generate considerable frame lag. If searching the root has to be done, put the result into a cached variable (Data Model Store) rather than searching every game tick.

Inputs

Instance (Slot)

The slot to scan for parent slots from.

Tag (String)

The tag to look for above Instance (Slot).

SearchDepth (int)

How far to search for a parent with a tag that matches the given Tag (String).

Examples: 0 > Search immediate parent. 1 > Search parent of slot and it's next parent. -1 > Search all the way to Root (CAN BE HEAVY)

Outputs

* (Slot)

The result of the search.

Examples