# 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(): 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!")