Verse Library verse

01 Device

Custom device that moves a prop when players enter a designated trigger zone.

verse-library/fortnite-using-animation-controller-moveto/01-device.verse

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }

# This is our "Device" — the brain of our trap.
# Think of this as the Gamepad that controls the prop.
class revenge_trap_device(creative_device):

    # --- EDITABLES (Things you change in the Editor) ---
    
    # The prop that will move (e.g., a Loot Chest)
    @editable
    PropToMove: creative_prop = creative_prop{}

    # The trigger zone. If a player enters this, the trap activates!
    @editable
    TriggerZone: trigger_zone = trigger_zone{}

    # How close does the player have to be to trigger the "panic"?
    # In-game analogy: The "Damage Radius" of a grenade.
    panic_distance: float = 500.0

    # How long should the panic move take? (Seconds)
    panic_speed: float = 2.0

    # --- VARIABLES (Things that change during the game) ---
    
    # We need to remember where the prop started so we can send it back.
    # This is like your "Last Known Location" on the minimap.
    home_location: vector = vector{}

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