Verse Library verse

01 Complete Script

Simple creative device class that prints arithmetic and string concatenation results on start.

extracted-snippets/documentation/en-us/uefn/learn-code-basics-2-practice-time-in-verse/01-complete-script.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/learn-code-basics-2-practice-time-in-verse
# Local doc:  epic-docs/documentation/en-us/uefn/learn-code-basics-2-practice-time-in-verse.md
# Section:    Complete Script
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
hello_world_device := class(creative_device):
# Runs when the device is started in a running game
OnBegin<override>()<suspends> : void =
Print("5 + -2 = {5 + -2}")
Print("15.0 / 7.0 = {15.0 / 7.0}")
Print("I + Love + Verse = {"I" + "Love" + "Verse"}")
Print("🐈💗🐟 = {"🐈💗🐟"}")

Comments

    Sign in to vote, comment, or suggest an edit. Sign in