Verse Library verse

12 Playing The Cinematic

Plays a cinematic, unlocks a door, switches player to first-person view, and disables the objective marker.

extracted-snippets/documentation/en-us/uefn/change-a-players-point-of-view-with-cameras-in-unreal-editor-for-fortnite/12-playing-the-cinematic.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/change-a-players-point-of-view-with-cameras-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/change-a-players-point-of-view-with-cameras-in-unreal-editor-for-fortnite.md
# Section:    Playing the Cinematic
# Plays a cinematic and unlocks the door.
PlayCinematic(Agent:agent)<suspends>:void=
Logger.Print("Player is holding item, playing cinematic...")
CinematicSequence.Play()
# Unlock the door, then open it.
Door.Unlock(Agent)
Door.Open(Agent)
set IsDoorOpen = true
# Add the first person camera to the agent. When the cinematic ends, the
# agent will be in first-person view.
FPSCamera.AddTo(Agent)
Logger.Print("Camera changed")
# Disable the Objective Marker
ObjectiveMarker.Disable()

Comments

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