# This code imports the device tools we need. using { /Fortnite.com/Devices } using { /Verse.org/Simulation } # We define our main class that holds our storm logic. # Think of this as the "boss" device. storm_manager := class(creative_device): # We define our main storm controller. # Think of this as the "boss" device. # Note: tag this property @editable so you can assign it in the UEFN editor. @editable my_controller : advanced_storm_controller_device = advanced_storm_controller_device{} # We define a beacon to change the storm's look. # This is like a remote control for the storm. # Note: tag this property @editable so you can assign it in the UEFN editor. @editable my_beacon : advanced_storm_beacon_device = advanced_storm_beacon_device{} # This function runs when the game starts. OnBegin():void= # First, the beacon is configured in the UEFN editor to link to a storm phase. # advanced_storm_beacon_device does not expose an Enable call in Verse; # enable/disable the beacon via its editor properties instead. # This is like flipping a switch to "Advanced Mode". # Next, we generate the storm so the controller begins running phases. # Imagine telling a robot: "Start your task list now." # Note: phase-to-beacon links are set up in the UEFN editor via # the controller's Storm Phases settings; Verse activates the devices. my_controller.GenerateStorm() # Finally, we destroy and regenerate as needed — the storm will now # shrink in stages as configured in the editor. # The storm is now active and will respond to its phase configuration.