Verse Library verse

01 Fragment

Manages a custom quick-time event using bound devices, tracking successes and failures to trigger win or fail states.

verse-library/creating-custom-skilled-interactions-in-unreal-editor-for-fortnite/01-fragment.verse

# ChaosLock.ver
# A simple Verse script to manage a QTE door

# 1. DEFINE THE CONSTANTS (The Rules)
# Think of these as the "Patch Notes" for your island. They never change.
const MAX_SUCCESSES := 3
const MAX_FAILURES := 2
const TIMER_SECONDS := 10.0

# 2. DEFINE THE ENTITIES (The Props)
# These are references to devices you place in the editor.
# 'bind' means "connect this code variable to that device."
var door_prop_mover := bind<PropMover>("Door_Mover")
var skilled_interaction := bind<SkilledInteraction>("Chaos_Lock_Device")
var view_model := bind<ViewModel>("Chaos_UI_Controller")

# 3. DEFINE THE STATE (The Scoreboard)
# Variables that change during the game.
var current_successes := 0
var current_failures := 0
var is_active := false

# 4. THE MAIN FUNCTION (The Game Loop)
# This runs when the device starts.
start_interaction() := func():
    is_active = true
    current_successes = 0
    current_failures = 0
    
    # Update UI immediately

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.

Sign in with Discord

Comments

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