# This is a simple Verse example to show how variables and functions work.
# It uses a trigger device to print sculpt settings when the game starts.
# Landscape sculpting itself is done in the UEFN editor, not through Verse code.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
sculpt_logger := class(creative_device):
# 1. Define the Brush Size — this is a Variable.
# A variable is like a container for a number.
var BrushSize : int = 50
# 2. Define the Height Change — another Variable.
# This controls how far up or down the terrain moves.
var HeightChange : float = 10.0
# 3. This function runs automatically when the game starts.
OnBegin<override>()<suspends> : void =
# 4. Print the current brush size so we can see the variable's value.
Print("Brush Size is set to: {BrushSize}")
# 5. Change the brush size variable — just like moving the slider in the editor.
set BrushSize = 10
Print("Brush Size changed to: {BrushSize}")
# 6. Print the height change value — this represents raising the ground.
Print("Height Change is: {HeightChange}")
Verse Library
verse
01 Device
Demonstrates defining and modifying variables for landscape brush size and height changes.
verse-library/landscape-sculpt-mode/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.