# We are defining a new Device class.
# Think of this as the "Blueprint" for our Chaos Platform.
class ChaosPlatformDevice(Device):
# ---------------------------------------------------------
# PROPERTY 1: The Target
# ---------------------------------------------------------
# This is a reference to the Creative Prop in the scene.
# We use @editable so we can drag-and-drop our platform
# into this slot in the UEFN editor.
@editable
TargetPlatform: CreativeProp = CreativeProp{}
# ---------------------------------------------------------
# PROPERTY 2: The Disappear Time
# ---------------------------------------------------------
# This is an 'Editable Float'.
# Float = A number with decimals (like 2.5 seconds).
# Editable = It shows up in the UEFN side panel.
# We initialize it to 2.0 (2 seconds) by default.
@editable
DisappearDuration: float = 2.0
# ---------------------------------------------------------
# PROPERTY 3: A Constant (Optional)
# ---------------------------------------------------------
# This is a 'Constant'. It cannot be changed in the editor.
# It’s set once in the code. Good for things like
# "Max Players" or "Fixed Damage" that shouldn't vary.
const MaxHealth: int = 100
Verse Library
verse
01 Fragment
Device class demonstrating editable properties and constants for configuring platform mechanics in UEFN.
verse-library/editing-the-device-properties-in-uefn/01-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.