# This is our Magic Wall Device
# It is like a robot waiting for a signal
device MagicWall: Device = Device{}
# This is the Variable (the Magic Jar)
# It stores the color we want to use
my_color: string = "Bright Red"
# This is the Event (the Doorbell)
# It happens when a player gets close
on player_nearby: function(player: Player) =
# Change the variable to a new color
my_color = "Bright Blue"
# Tell the wall to paint itself
# We use the device's built-in tool
MagicWall.SetColor(my_color)
# Tell the player "You did it!"
Print("Wow! The wall changed color!")
Verse Library
verse
01 Fragment
Listens for player proximity to trigger dynamic color changes and log feedback for interactive props.
verse-library/building-basics-in-fortnite-creative/01-fragment.verse