# This script creates a named Sentry with custom health
# We use a "Device" to link to the Sentry object in the world
sentry_device : Device = Device{}
# This function runs when the game starts
OnBegin<override>()<suspends>: void =>
# Find the Sentry device by its name in the editor
# We assume you named the device "MyGuard" in UEFN
guard := GetDevice("MyGuard")
# Check if we found the device
if (guard != nil):
# Set the health of the Sentry
# 1000 is a strong health value
guard.SetHealth(1000)
# Print a message to the console
# This helps you know the script worked
Print("MyGuard is now super strong!")
Verse Library
verse
01 Fragment
Sets a sentry device's health to 1000 at game start by locating it by name and logging confirmation.
verse-library/using-sentry-devices-in-fortnite-creative/01-fragment.verse