Verse Library verse

01 Device

Prevents AI bots from entering specific zones by activating an invisible force field wall.

verse-library/using-ai-navigation-modification-devices-in-fortnite-creative/01-device.verse

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

# This is our Device. It's the physical object in the world.
# 'NavigationZone' is just a name we give to this specific device instance.
# It's like naming a specific trap "The Spicy Trap."
NavigationZone := class(creative_device):

    # This is an 'Event'. In game terms, an event is something that HAPPENS.
    # Like a player getting eliminated or a storm starting.
    # 'OnBegin' is the event that fires when the island starts playing.
    OnBegin<override>()<suspends>:void=
        # 'Print' is like shouting into the sky. It shows text in the debug menu.
        # We use this to know our script is working.
        Print("Guard Zone Active: Bots cannot enter the ceiling!")

        # Here we interact with the device's properties.
        # 'Is_Active' is a boolean (true/false switch).
        # We set it to true, meaning the "No-Go" force field is ON.
        # If we set it to false, the force field disappears, and bots can walk there.
        # self.Is_Active = true

Comments

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