Verse Library verse

Heartbeat

verse-source/SampleVerse/PropHuntTemplate/heartbeat.verse

using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/UI }
using { /Verse.org/Colors }
using { /Verse.org/Simulation }

log_heart_beat := class(log_channel){}

# These messages are used to notify a prop agent with a message (or to hide it) when they need to move to avoid their heartbeat from becoming visible.
HeartBeatWarningMessage<localizes>(Time:int):message = "Heart Beat in {Time} Seconds. Move!"
HeartBeatWarningClear<localizes>:message = ""

# This class exposed the editable properties for the heartbeat to the prop_hunt device.
heart_beat := class<concrete>():
    Logger:log = log{Channel:=log_heart_beat}

    @editable # The number of seconds before a prop agent must move before the heartbeat reveals their position.
    MoveTime:float = 15.0

    @editable # The seconds remaining before the heartbeat warning appears. Shouldn't be > than HeartBeatTimer.
    WarningTime:float = 5.0

    @editable # An array of heartbeat VFX devices. There is one per player.
    AgentVFX:[]heartbeat_vfx = array{}

    @editable # The audio player device used to play the heartbeat sound effects (SFX).
    SFXPlayer:radio_device = radio_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