Verse Library verse

05 Teleporting Players After A Cutscene

A creative device that waits for a cinematic to stop, then teleports all current players to a target location.

extracted-snippets/documentation/en-us/uefn/escape-room-11-teleporting-players-in-unreal-editor-for-fortnite/05-teleporting-players-after-a-cutscene.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/escape-room-11-teleporting-players-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/escape-room-11-teleporting-players-in-unreal-editor-for-fortnite.md
# Section:    Teleporting Players after a Cutscene
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

## A Verse-authored creative device that can be placed in a level
log_transporter_device := class(log_channel){}

transporter_device := class(creative_device):

    @editable
    CinematicSequence : cinematic_sequence_device = cinematic_sequence_device{}            

    @editable
    Teleporter : teleporter_device = teleporter_device{} 

    @editable
    PlayerSpawner : player_spawner_device = player_spawner_device{}


    ## Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        Print("Loading CutScene")

        CinematicSequence.StoppedEvent.Subscribe(TeleportPlayers)
    
	
    TeleportPlayers():void=

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