Verse Library verse

18 Triggerable Light Component

Toggles descendant mesh and light components on or off to reverse an activated state.

extracted-snippets/documentation/en-us/fortnite/lights-and-bridges-03-trigger-component-and-triggerable-child-classes-in-fortnite/18-triggerable-light-component.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/lights-and-bridges-03-trigger-component-and-triggerable-child-classes-in-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/lights-and-bridges-03-trigger-component-and-triggerable-child-classes-in-fortnite.md
# Section:    Triggerable Light Component
PerformReverseAction<override>():void=
if (IsLightOn?):
for (DescendantEntity:Entity.FindDescendantEntities(entity), Entity = DescendantEntity.GetParent[]):
if (MeshComponent := DescendantEntity.GetComponent[mesh_component]):
if (LightComponent := DescendantEntity.GetComponent[light_component]):
MeshComponent.Disable()
LightComponent.Disable()
else:
MeshComponent.Enable()
set IsLightOn = false
set Triggered = false

Comments

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