using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/Diagnostics }
# This is our main class, the "Brain" of our device.
# Think of it as the device itself, but with a brain attached.
class RevengeTrapDevice(creative_device):
# --- VARIABLES (The Stats) ---
# This is a variable. It starts as false (off).
# Like a light switch that is currently in the 'off' position.
is_active: bool = false
# This is a reference to the Prop we placed in the editor.
# Think of this as "pointing" to the specific chest in your loot pool.
@editable
target_prop: creative_prop = creative_prop{}
# --- FUNCTIONS (The Abilities) ---
# A function to turn the trap ON.
# Like pressing the 'Activate' button on a trap.
ActivateTrap() -> void:
is_active = true
# Change the prop's color to red.
# We are accessing the 'material' component of the prop.
target_prop.SetMaterialColor(Color{R:1.0, G:0.0, B:0.0})
PrintToAll("Trap Activated! Watch your back.")
Verse Library
verse
01 Device
Manages a creative device trap that toggles activation state and dynamically changes a prop material color.
verse-library/techoverview/01-device.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.