Verse Library verse

01 Device

Activates a movement modifier device to slow players, then automatically disables it after five seconds.

verse-library/using-movement-modulator-devices-in-fortnite-creative/01-device.verse

# This script makes a movement modulator slow players down.

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

# We create a new script called SlowZone
SlowZoneActor := class(creative_device):
    # This is the device we will control.
    # We give it a name "Modulator" so we can find it.
    # Drag the Movement Modulator device onto this property in the editor.
    @editable
    Modulator : movement_modulator_device = movement_modulator_device{}

    # This runs when the game starts.
    OnBegin<override>()<suspends>:void=
        # First, we tell the device to slow players down.
        # We set the walk speed multiplier to 0.2, which is a very strong slow effect.
        # note: movement_modulator_device exposes Enable/Disable but not a
        # SetSpeedModifier runtime call; speed mode is configured in editor properties.
        # We call Enable() so the device is active when the game begins.
        Modulator.Enable()

        # We then wait 5 seconds to match the intended duration from the lesson.
        # After this wait we disable the device, mimicking a 5-second slow effect.
        Sleep(5.0)

        # Turn the device off after 5 seconds.
        Modulator.Disable()

Comments

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