Verse Library verse

04 Define The Puzzle Component

Disables enableable puzzle piece components across all descendant entities to reset puzzle logic.

extracted-snippets/documentation/en-us/fortnite/lights-and-bridges-02-puzzle-component-in-fortnite/04-define-the-puzzle-component.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/lights-and-bridges-02-puzzle-component-in-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/lights-and-bridges-02-puzzle-component-in-fortnite.md
# Section:    Define the Puzzle Component
# Disable puzzle pieces
DisableTriggerableComponents<private>():void=
for:
DescendantEntity : Entity.FindDescendantEntities(entity)
DescendantEntityComponent : DescendantEntity.GetComponents()
CastToTriggerable := triggerable[DescendantEntityComponent]
CastToTriggerable.PuzzlePiece?
CastToEnableable := enableable[DescendantEntityComponent]
do:
CastToEnableable.Disable()

Comments

    Sign in to vote, comment, or suggest an edit. Sign in