Verse Library verse

04 Device

Sets a timer to 30 seconds and starts the countdown when the game world begins.

verse-library/verse-devices-reading-and-using/04-device.verse

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

arena_controller := class(creative_device):

    @editable
    RoundTimer : timer_device = timer_device{}

    OnBegin<override>()<suspends> : void =
        # Configure first, then start. 30 seconds on the clock.
        RoundTimer.SetActiveDuration(30.0)
        RoundTimer.Start()
        Print("Round started: 30 seconds!")

Comments

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