# Import the necessary Verse libraries for interacting with the game world using { /Fortnite.com/Devices } using { /UnrealEngine.com/Temporary/Schemas } # Define our Device. This is like creating a new "Item" in Creative. # It will sit in the center of our arena. Ancient Altar Device := class(creative_device): # This is a "Variable" - a container that changes. # Think of it like a player's HP bar. It starts at 0 (dark) and goes to 1 (glowing). AltarGlowAmount : float = 0.0 # This is an "Event" - something that happens in the game. # Like a "Elimination" event, this triggers when a player enters the device's zone. OnPlayerEnter := event(player: player): # Find the "Altar Prop" in our Scene Graph. # We use the Hierarchy to find the specific entity named "Central Altar". altar_prop := GetEntity("Central Altar") if (altar_prop != none): # Get the "Visual" component of the prop. # This is like checking the player's skin. visual := GetVisual(altar_prop) # Change the "Emissive" (glow) intensity. # We set it to 1.0, which means "full glow." # This is like switching a player's health from 0 to 100. SetEmissiveIntensity(visual, 1.0) # Update our variable to reflect the new state. AltarGlowAmount = 1.0 # This event triggers when a player leaves. OnPlayerExit := event(player: player): altar_prop := GetEntity("Central Altar") if (altar_prop != none): visual := GetVisual(altar_prop) # Turn off the glow (set to 0.0). # Like a player dying, the glow "dies" too. SetEmissiveIntensity(visual, 0.0) AltarGlowAmount = 0.0