Verse Library verse

01 Fragment

Activates on player entry to pause gameplay, hide the character, and play a scripted camera sequence.

verse-library/making-cinematics-4-integrating-cinematics-in-unreal-editor-for-fortnite/01-fragment.verse

# Import necessary Verse modules for game logic
use CoreGame
use CoreSystems
use CoreUObject

# Define our Cinematic Trigger Actor
# This is the "container" for our logic
actor MyCinematicTrigger extends WorldActor {
    
    # A variable to track if the cinematic has already played
    # Think of this like a "One-Time Use" key item.
    cinematic_played: bool = false

    # This event fires when a Player enters the trigger volume
    OnPlayerEntered := event (player: Player) {
        
        # Check if the cinematic hasn't played yet for this session
        # (In a real game, you might want this to play once per match, not per player)
        if cinematic_played == false {
            
            # 1. PAUSE THE GAME
            # We need to stop the storm and disable player movement
            # so they don't run away while the camera is doing its thing.
            GamePause()
            
            # Hide the player's character mesh temporarily
            # This prevents clipping issues if the camera is close
            player.SetCharacterHidden(true)
            
            # 2. PLAY THE CINEMATIC

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