# NeonFlash.verse
# A script that changes a neon light's color when a player enters a trigger.
use {
CoreGame, # Core game systems
CoreAssets, # Colors and assets
Player, # Player detection
Timer, # For delays
}
# The main script attached to the Trigger Volume
NeonFlash = script(
# Reference to the Neon Light Component.
# You must drag your neon light into this slot in the editor!
NeonLight: ComponentReference<NeonLightComponent>,
# Reference to the Trigger Component (the volume itself)
Trigger: ComponentReference<TriggerComponent>,
)
# This event fires when a player enters the trigger volume.
# Think of this as the 'Elimination' event for the floor.
OnPlayerEntered = Trigger.PlayerEntered:Subscribe(
func(trigger: TriggerComponent, player: Player): void = {
# 1. Change the light to RED immediately.
NeonLight.SetColor(
Color = CoreAssets.Colors.Red
)
# 2. Schedule a change to BLUE after 1 second.
Verse Library
verse
02 Fragment
Triggers delayed neon light color changes when players enter a volume using component references and timer scheduling.
verse-library/using-audio-and-visual-effect-galleries-in-fortnite-creative/02-fragment.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.