# This is a simple script for a Pop-up Dialog.
# It listens for player clicks.
# This function runs when the dialog is shown.
OnShow := func():
print("Dialog is now visible to the player.")
# This function runs when a choice is clicked.
OnChoice := func(choice: string):
# Check which button was clicked.
if choice == "Yes":
print("Player chose Yes! Let's start.")
# You can add more code here to start the game.
else if choice == "No":
print("Player chose No. We will wait.")
else:
print("Unknown choice selected.")
Verse Library
verse
01 Fragment
Logs dialog visibility and processes player button choices to branch subsequent gameplay actions.
verse-library/using-popup-dialog-devices-in-fortnite-creative/01-fragment.verse