Verse Library verse

15 Complete Code

Main creative device skeleton defining editable references for doors, triggers, cameras, and cinematics.

extracted-snippets/documentation/en-us/uefn/transitioning-player-point-of-view-with-cameras-in-unreal-editor-for-fortnite/15-complete-code.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/transitioning-player-point-of-view-with-cameras-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/transitioning-player-point-of-view-with-cameras-in-unreal-editor-for-fortnite.md
# Section:    Complete Code
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
door_open_log := class(log_channel){}

door_open_cinematic_manager := class(creative_device):

    Logger:log = log{Channel := door_open_log}

    # The input trigger that listens for the player swinging their weapon 
    # when inside the DoorVolume.
    @editable
    FireTrigger:input_trigger_device = input_trigger_device{}
        
    # The cinematic sequence device that plays the cinematic when opening the door.
    @editable
    CinematicSequence:cinematic_sequence_device = cinematic_sequence_device{}

    # The Conditional Item Button that checks that the player has the correct weapon.
    @editable
    ConditionalButton:conditional_button_device = conditional_button_device{}

    # The lock device that prevents the door from being opened.
    @editable
    Door:lock_device = lock_device{}

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