VerseIsland
Feed Learn Leaderboard Guides Reference Explore Search Docs Verse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Verse Library › UI
Browse Verse Library

Library

Devices 634
  • Devices171
  • Triggers & Logic118
  • UI & HUD40
  • Audio39
  • Items & Inventory29
  • Events27
  • Scoring & Objectives25
  • Spawning19
  • Classes & Interfaces18
  • Game Modes17
  • Props & Meshes14
  • Variables & Mutability12
  • Player Management11
  • Modules & Structure10
  • Round Flow8
  • Animation6
  • Concurrency6
  • Functions6
  • Getting Started6
  • Teams & Classes6
  • NPCs & AI5
  • Tutorials5
  • VFX & Particles5
  • Arrays & Maps4
  • Cameras4
  • Debugging4
  • Control Flow3
  • Cinematics2
  • Other2
  • Persistence2
  • Scene Graph2
  • Structs & Enums2
  • Building1
  • Physics1
  • Publishing & Islands1
  • Syntax & Types1
  • Vehicles1
  • Weapons1
Verse Language 257
  • Control Flow35
  • Functions26
  • Arrays & Maps25
  • Classes & Interfaces22
  • Variables & Mutability22
  • Concurrency21
  • Syntax & Types18
  • Modules & Structure12
  • Debugging8
  • Devices8
  • Events7
  • Player Management6
  • Structs & Enums6
  • Triggers & Logic6
  • Game Modes5
  • Failure & Options4
  • Scene Graph4
  • UI & HUD4
  • Getting Started3
  • Round Flow3
  • Spawning3
  • VFX & Particles3
  • Reference2
  • Animation1
  • Best Practices1
  • Other1
  • Props & Meshes1
Materials/VFX 154
  • Triggers & Logic27
  • UI & HUD17
  • Devices16
  • VFX & Particles14
  • Props & Meshes11
  • Scoring & Objectives9
  • Game Modes7
  • Items & Inventory7
  • Functions6
  • Arrays & Maps5
  • Animation3
  • Cinematics3
  • Classes & Interfaces3
  • Control Flow3
  • Events3
  • Modules & Structure3
  • Round Flow3
  • Spawning3
  • Getting Started2
  • Scene Graph2
  • Variables & Mutability2
  • Concurrency1
  • Persistence1
  • Player Management1
  • Structs & Enums1
  • Syntax & Types1
General 153
  • Devices22
  • Events20
  • Triggers & Logic20
  • Classes & Interfaces10
  • Variables & Mutability8
  • Round Flow6
  • Scoring & Objectives6
  • UI & HUD6
  • Functions5
  • Player Management5
  • Game Modes4
  • Getting Started4
  • Props & Meshes4
  • Control Flow3
  • Syntax & Types3
  • VFX & Particles3
  • Arrays & Maps2
  • Best Practices2
  • NPCs & AI2
  • Other2
  • Physics2
  • Scene Graph2
  • Spawning2
  • Structs & Enums2
  • Tutorials2
  • Building1
  • Cameras1
  • Cinematics1
  • Failure & Options1
  • Items & Inventory1
  • Teams & Classes1
Player 133
  • Player Management22
  • Teams & Classes19
  • Classes & Interfaces12
  • Devices11
  • Events9
  • Persistence7
  • Triggers & Logic7
  • Arrays & Maps6
  • Functions4
  • Game Modes4
  • Items & Inventory4
  • Round Flow4
  • Debugging3
  • Getting Started3
  • Modules & Structure3
  • Concurrency2
  • Control Flow2
  • Scoring & Objectives2
  • Spawning2
  • Structs & Enums2
  • Physics1
  • Props & Meshes1
  • UI & HUD1
  • Variables & Mutability1
  • Weapons1
Building & Props 131
  • Variables & Mutability15
  • Props & Meshes14
  • Triggers & Logic12
  • Classes & Interfaces10
  • Devices10
  • UI & HUD10
  • Events7
  • Teams & Classes7
  • Animation5
  • Building5
  • Functions5
  • VFX & Particles5
  • Structs & Enums4
  • Control Flow3
  • Game Modes3
  • Items & Inventory3
  • Round Flow3
  • Scene Graph3
  • Arrays & Maps2
  • Concurrency2
  • Reference2
  • Modules & Structure1
NPCs & AI 76
  • NPCs & AI35
  • Spawning7
  • Animation5
  • Variables & Mutability5
  • Classes & Interfaces3
  • Debugging3
  • UI & HUD3
  • Audio2
  • Concurrency2
  • Game Modes2
  • Props & Meshes2
  • Triggers & Logic2
  • Devices1
  • Functions1
  • Getting Started1
  • Reference1
  • VFX & Particles1
Spawning 73
  • Spawning31
  • Events7
  • Concurrency6
  • Player Management6
  • Vehicles5
  • Props & Meshes4
  • Devices3
  • Scene Graph3
  • Items & Inventory2
  • Teams & Classes2
  • Control Flow1
  • Publishing & Islands1
  • Reference1
  • Scoring & Objectives1
Cinematics 71
  • Cameras19
  • Cinematics15
  • Devices11
  • Audio5
  • Animation4
  • Triggers & Logic4
  • Functions2
  • Game Modes2
  • UI & HUD2
  • Classes & Interfaces1
  • Concurrency1
  • Control Flow1
  • Items & Inventory1
  • Modules & Structure1
  • Scene Graph1
  • Templates1
UI 57
  • UI & HUD35
  • Devices5
  • Scoring & Objectives4
  • Classes & Interfaces3
  • Round Flow2
  • Scene Graph2
  • Arrays & Maps1
  • Props & Meshes1
  • Structs & Enums1
  • Templates1
  • Triggers & Logic1
  • Variables & Mutability1
Scene Graph 40
  • Scene Graph9
  • Items & Inventory8
  • Classes & Interfaces3
  • Events3
  • Props & Meshes3
  • Functions2
  • Arrays & Maps1
  • Building1
  • Control Flow1
  • Debugging1
  • Modules & Structure1
  • Player Management1
  • Reference1
  • Structs & Enums1
  • Syntax & Types1
  • Triggers & Logic1
  • UI & HUD1
  • VFX & Particles1
Vehicles 38
  • Spawning11
  • Devices7
  • Vehicles7
  • Props & Meshes4
  • Functions2
  • Game Modes2
  • Failure & Options1
  • Items & Inventory1
  • Reference1
  • Teams & Classes1
  • Tutorials1
Tutorials 37
  • Game Modes6
  • Triggers & Logic5
  • Classes & Interfaces4
  • Events4
  • Props & Meshes3
  • Building2
  • Devices2
  • Items & Inventory2
  • Scoring & Objectives2
  • Animation1
  • Arrays & Maps1
  • Cameras1
  • Concurrency1
  • Physics1
  • Player Management1
  • Structs & Enums1
Weapons 30
  • Game Modes6
  • Weapons6
  • Devices5
  • Items & Inventory3
  • Scoring & Objectives3
  • Spawning2
  • Teams & Classes2
  • Best Practices1
  • Functions1
  • Triggers & Logic1
Items 28
  • Items & Inventory23
  • Devices2
  • Triggers & Logic2
  • Spawning1
Assets 20
  • Modules & Structure6
  • Arrays & Maps3
  • Functions3
  • Scene Graph2
  • Best Practices1
  • Devices1
  • Events1
  • Failure & Options1
  • Physics1
  • Variables & Mutability1
Animation 19
  • Animation10
  • Variables & Mutability4
  • Devices1
  • Player Management1
  • Props & Meshes1
  • Scene Graph1
  • Syntax & Types1
Release Notes 17
  • Classes & Interfaces5
  • Modules & Structure3
  • Concurrency2
  • Control Flow2
  • Variables & Mutability2
  • Debugging1
  • Devices1
  • Items & Inventory1
Input & Controls 16
  • Functions4
  • UI & HUD3
  • Control Flow2
  • Animation1
  • Arrays & Maps1
  • Cinematics1
  • Debugging1
  • Devices1
  • Events1
  • Items & Inventory1
Publishing 8
  • Control Flow5
  • Arrays & Maps1
  • Devices1
  • Syntax & Types1
Audio 7
  • Audio5
  • UI & HUD2
Landscape 7
  • Other4
  • VFX & Particles2
  • Scene Graph1
Persistence 6
  • Structs & Enums2
  • Items & Inventory1
  • Persistence1
  • Publishing & Islands1
  • Variables & Mutability1
Physics 5
  • Functions2
  • Classes & Interfaces1
  • Devices1
  • Syntax & Types1
Creator Economy 3
  • Publishing & Islands2
  • Modules & Structure1
Discovery 3
  • Devices1
  • NPCs & AI1
  • Structs & Enums1
Editor & Project 3
  • Other1
  • Props & Meshes1
  • Tutorials1

Screen Fade Effects

Module — 2 files
These files compile together (same module folder).
ez_ui_fadescreenfx.verse
<#

    A fully customisable, general purpose screen fade 
    effect which can be used for transitions, status 
    effects, death screens, flashbangs, ect..
    
    Includes two visual effects settings:
        FadeInOut
            fron InitialOpacity to FinalOpacity and back again
            this is the default effect for the device

        FadeTo
            from InitialOpacity to FinalOpacity and will need
            to be enabled on the device properties via the tickbox

    HideHUD Warning
        Be aware that UEFN's API does NOT support the ability to
        change the HUD for a specific player. This can only be done
        for specific classes, teams or everyone at once. Therefore
        do not use this feature except in single player games.

#>

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

#imports
using { /UnrealEngine.com/Temporary/UI }
using { /Fortnite.com/UI }
using { /Verse.org/Colors }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Assets }
using { /Fortnite.com/Characters }
using {EZUI}

EZ_FadeScreenFX := class () 
{

    EZ_LinkedCreativeDevice<public> : ez_ui_fadescreenfx    # a backreference to the device that created this EZUI class
    EZ_LinkedPlayer<public> : player                        # the player linked to this instance of the EZUI class
    EZ_UI_ID<public> : int                                  # used to control what UI is initialised by the class

    EZ_FadeFXColor<public> : color                          # the screen effect color
    EZ_InitialOpacity<public> : float                       # initial opacity
    EZ_FinalOpacity<public> : float                         # final opacity

    EZ_FadeInDuration : float                               # duration  (seconds) from initial to final opacity
    EZ_FadeHoldDuration : float                             # duration (seconds) of the widget being at final opacity
    EZ_FadeOutDuration : float                              # duration (seconds) from final to initial opacity for the FadeInout effect

    EZ_ZOrder : int                                         # the Z-Order of the effect for controlling what UI layers are covered by it

    EZ_DisablePlayerMovement : logic                        # if the player is to be immobilised during the vfx or not (useful for transitions, cutscenes ,ect..)
    EZ_HideHUD : logic                                      # hides and then restores the HUD during the effect. ONLY USE THIS IN SINGLE PLAYER!
    
    var IsInitialized<private> : logic = false              # a lock to prevent recreating the canvas after the first execution of Initialize()
    var MainCanvas<private> : canvas = canvas{}             # the canvas that holds all the screen elements and will be added to the PlayerUI

    AnchorFullscreen : anchors = anchors{Minimum := vector2{X := 0.0,Y := 0.0},Maximum := vector2{X := 1.0,Y := 1.0}}
    NoOffset : margin = margin{Top := 0.0, Left := 0.0, Right := 0.0, Bottom := 0.0}
    AlignCentre : vector2 = vector2{X := 0.5, Y := 0.5}

    ScreenFXWidget<private> : color_block = color_block
    {
        DefaultColor := color{R := 1.0, G := 1.0, B := 1.0}
    }


    # do all the things
    Ini<public>() : void =
        if (IsInitialized?): 
            return

        ScreenFX()
       
    #.........................
    
    OpenUI<public>() : void =

        if (EZ_DisablePlayerMovement?):
            DisablePlayerControls()
        
        if (EZ_HideHUD?):
            SetHUDVisibility(false)

        EZUI.InsertWidget (EZ_LinkedPlayer,GetMainCanvas())
        spawn{BeginVFX()}


    CloseUI<public>() : void =

        EZUI.DeleteWidget(EZ_LinkedPlayer,GetMainCanvas())
        set IsInitialized = false

        if (EZ_HideHUD?):
            SetHUDVisibility(true)

        if (EZ_DisablePlayerMovement?):
            RestorePlayerControls()

    #.........................

    GetMainCanvas<public>() : canvas = MainCanvas
    GetFXWidget<public>() : color_block = ScreenFXWidget

    #.........................

    # Builds a canvas
    ScreenFX <private>() : void =
        
        UI_ZOrder: type{_X:int where 0 <= _X, _X <= 2147483647 } = type{_X:int where 0 <= _X, _X <= 2147483647 }[EZ_ZOrder] or Err("Should be unfailable")
        set MainCanvas = canvas
        {
            Slots := array
                {
                    canvas_slot
                    {
                        Anchors := anchors{Minimum := vector2{X := 0.0,Y := 0.0},Maximum := vector2{X := 1.0,Y := 1.0}}
                        Offsets := margin{Top := 0.0, Left := 0.0, Right := 0.0, Bottom := 0.0}
                        Alignment := vector2{X := 0.5, Y := 0.5}
                        ZOrder := UI_ZOrder
                        SizeToContent := true
                        Widget := ScreenFXWidget
                    }

                }
        }
        
        set IsInitialized = true # Lock the inialization state to prevent from running this function again

    #.........................

    BeginVFX <private>()<suspends> : void =

        if(EZ_UI_ID = 1): #FadeIn/Out
            EZUI.FadeVFX(GetFXWidget(), EZ_FadeFXColor, EZ_InitialOpacity, EZ_FinalOpacity, EZ_FadeInDuration)
            Sleep(EZ_FadeInDuration + EZ_FadeHoldDuration)
            EZUI.FadeVFX(GetFXWidget(), EZ_FadeFXColor, EZ_FinalOpacity, EZ_InitialOpacity, EZ_FadeOutDuration)
            CloseUI()

        if(EZ_UI_ID = 2): #FadeTo
            EZUI.FadeVFX(GetFXWidget(), EZ_FadeFXColor, EZ_InitialOpacity, EZ_FinalOpacity, EZ_FadeInDuration)
            Sleep(EZ_FadeInDuration + EZ_FadeHoldDuration)
            CloseUI()

    #.........................

    DisablePlayerControls() : void =
        if(PlayerAgent := agent[EZ_LinkedPlayer]):
            PlayerCharacter := PlayerAgent.GetFortCharacter[] or Err("[EZUI] : DisablePlayerControls()  - Should be unfailable")
            PlayerCharacter.PutInStasis(stasis_args{})

    RestorePlayerControls() : void =
        if(PlayerAgent := agent[EZ_LinkedPlayer]):
            PlayerCharacter := PlayerAgent.GetFortCharacter[] or Err("[EZUI] : RestorePlayerControls()  - Should be unfailable")
            PlayerCharacter.ReleaseFromStasis()

    #.........................

    # not currently supported by the UEFN API on a per player basis
    SetHUDVisibility( ShowHUD : logic) : void = 

        # you may not use all HUD elements in your game so adjust this list as needed
        ActiveHUDElementsList  := array:
            player_hud_identifier_all{}
            creative_hud_identifier_build_menu{}
            creative_hud_identifier_crafting_resources{}
            creative_hud_identifier_elimination_counter{}
            creative_hud_identifier_equipped_item{}
            creative_hud_identifier_experience_level{}
            creative_hud_identifier_experience_supercharged{}
            creative_hud_identifier_experience_ui{}
            creative_hud_identifier_health{}
            creative_hud_identifier_health_numbers{}
            creative_hud_identifier_hud_info{}
            creative_hud_identifier_interaction_prompts{}
            creative_hud_identifier_map_prompts{}
            creative_hud_identifier_mimimap{}
            creative_hud_identifier_pickup_stream{}
            creative_hud_identifier_player_count{}
            creative_hud_identifier_player_inventory{}
            creative_hud_identifier_round_info{}
            creative_hud_identifier_round_timer{}
            creative_hud_identifier_shield_numbers{}
            creative_hud_identifier_shileds{}
            creative_hud_identifier_shields{}
            creative_hud_identifier_storm_notifications{}
            creative_hud_identifier_storm_timer{}
            creative_hud_identifier_team_info{}
            hud_identifier_world_resource_wood{}
            hud_identifier_world_resource_stone{}
            hud_identifier_world_resource_metal{}
            hud_identifier_world_resource_permanite{}
            hud_identifier_world_resource_gold_currency{}
            hud_identifier_world_resource_ingredient{}

        
        if (ShowHUD?): 
            EZUI.GetMyHUDController(EZ_LinkedCreativeDevice).ShowElements(ActiveHUDElementsList)
        else:
            EZUI.GetMyHUDController(EZ_LinkedCreativeDevice).HideElements(ActiveHUDElementsList)


    #.........................

         

} # END EZ_FadeScreenFX ------------------------------------------------------------------------------------------------------------------------------------

ez_ui_fadescreenfx := class(creative_device):

    @editable ShowUITrigger : trigger_device = trigger_device {}
    @editable FadeTo : logic = false

    @editable FadeFXColor : color = color{R := 0.0, G := 0.0, B := 0.0}
    @editable InitialOpacity : float = 0.0
    @editable FinalOpacity : float = 1.0

    @editable FadeInDuration : float = 1.0
    @editable FadeHoldDuration : float = 1.0
    @editable FadeOutDuration : float = 1.0

    @editable ZOrder : int = 99

    @editable DisablePlayerMovement : logic = true
    @editable HideHUD : logic = false


    # UI regisitration
    var PlayerToUIMap : [player]EZ_FadeScreenFX = map{} #[playerdata]/ez_ui class


    OnBegin<override>()<suspends> : void =
        ShowUITrigger.TriggeredEvent.Subscribe(OpenUI)

    # all the steps needed to open the Pop Up
    OpenUI<private>(MaybePlayer : ?agent) : void = 
    {
    
        # check that the event was triggered by a player and stop if it wasn't
        Result := EZUI.IsAPlayer(MaybePlayer,Self)
        if (Result = false):
            return
        #.........................


        # ui fx selected by a UI ID number
        var UI_ID : int = 1 ; # defaults to FadeIn/Out effect

        if (FadeTo?): 
            set UI_ID = 2

        #.........................

        if(PlayerAgent := MaybePlayer?): #set the typing to agent from ?agent

            # Verify if an Linked pop-up manager already exists and uses it, if not, create a new one
            if ( InteractingPlayer := player[PlayerAgent] ) 
            {   
                var OptPlayerUI :?EZ_FadeScreenFX = false
        
                if (ThisPlayerUI := PlayerToUIMap[InteractingPlayer])
                { set OptPlayerUI = option{ThisPlayerUI} }
                    
                else if (ThisPlayerUI := set PlayerToUIMap[InteractingPlayer] = EZ_FadeScreenFX

                            #everything that is passed to the pop-up manager
                            { 
                                EZ_LinkedPlayer := InteractingPlayer,
                                EZ_LinkedCreativeDevice := Self, 
                                EZ_UI_ID := UI_ID,

                                EZ_FadeFXColor := FadeFXColor,
                                EZ_InitialOpacity := InitialOpacity,
                                EZ_FinalOpacity := FinalOpacity,

                                EZ_FadeInDuration := FadeInDuration,
                                EZ_FadeHoldDuration := FadeHoldDuration,
                                EZ_FadeOutDuration := FadeOutDuration,
                                EZ_ZOrder := ZOrder,

                                EZ_DisablePlayerMovement := DisablePlayerMovement,
                                EZ_HideHUD := HideHUD


                            }
                        ) 
                    
                { ThisPlayerUI.Ini(), set OptPlayerUI = option{ThisPlayerUI} }
        
                # Try to open the Interface for the player
                if (PlayerUI := OptPlayerUI?):
                    PlayerUI.OpenUI()
                else 
                    { Print("Error when getting saved or creating ThisPlayerUI") }
            }
        #.........................
    }



<#
    a special thamks to: 
        Mayapple
        SprinterMax
        Daigorō
        UEFN Discord community

    ****************************************************************************************
    Made with EZUI, please follow @kryyative on Instagram Threads and @KryyssX on X (Twitter)
    for more useful Snippets, UEFN & UE5 news,tutorials and community spotlights!
    ****************************************************************************************

    If you found EZUI useful please include the text above in your credits to show your support
    for my work and encourage others to use EZUI for their projects. Thank you! ^_^
#>
file_2.verse
<#
   This module needs to be used for any EZUI scripts and 
   contains premade features for the framework. Call these
   functions with "EZUI.<function>" from your scripts after
   importing them with "using {EZUI}"
#>

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

#imports
using { /UnrealEngine.com/Temporary/UI }
using { /Fortnite.com/UI }
using { /Verse.org/Colors }
using { /Fortnite.com/Playspaces }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Assets }
using { /Fortnite.com/Characters }


EZUI<public> := module:

    # Custom data types  ---------------------------------------------------------------------------------------

    ezui_opacity_range<public> := struct<concrete>{ @editable Value:type{_X:float where 0.000000 <= _X, _X <= 1.000000} = 0.0}
    ezui_anchor_range<public> := struct<concrete>{ @editable Value:type{_X:float where 0.000000 <= _X, _X <= 1.000000} = 0.0}

    # Toolkit ---------------------------------------------------------------------------------------

    <# 
        EZUI.TextToMsg
        comverts a text string to a UI message
    #>
    TextToMsg<public><localizes> (t : string) : message = "{t}" 

    <# 
        EZUI.IntToMsg
        comverts an int to a UI message
    #>
    IntToMsg<public><localizes>(i : int) : message = "{i}"

    <#
        EZUI.IsAPlayer
        used to determine if a TriggerEvent is from a player, or to check if the 
        input is a player, to allow for a UI to be safely referenced
    #>
    IsAPlayer<public>(MaybeAgent : ?agent, VerseDevice : creative_device) : logic =

        if(not MaybeAgent?):
            #Print("EZUI: Not an Agent")
            return false

        if(MaybePlayer := MaybeAgent?):
            for (k -> v : VerseDevice.GetPlayspace().GetPlayers()):
                if (v = player[MaybePlayer]):
                    #Print("EZUI: Is a Player")
                    return true
        
        #Print("EZUI: Not a Player")
        return false
      
    <# 
        EZUI.InsertWidget
        add a specific widget to a specific player's UI
    #>
    InsertWidget<public>(Player : player, NewWidget : widget) : void =
        if (PlayerUI := GetPlayerUI[Player]):
            PlayerUI.AddWidget(NewWidget)
    
    <# 
        EZUI.DeleteWidget
        removes a specific widget from a specific player's UI
    #>
    DeleteWidget<public>(Player : player, Widget : widget) : void =
        if (PlayerUI := GetPlayerUI[Player]):
            PlayerUI.RemoveWidget(Widget)

    <# 
        EZUI.GetMyHUDController
        returns the HUD controller for the requesting verse device's playspace
        and is used to show or hide all or parts of the default Fortnite UI
    #>
    GetMyHUDController <public> (VerseDevice : creative_device) : fort_hud_controller =
        Playspace := VerseDevice.GetPlayspace()
        HUDController := Playspace.GetHUDController()
        return HUDController





    # VFX library ---------------------------------------------------------------------------------

    <#
        EZUI.FlickerVFX
        Used to create a flickering effect on UI elements for a defined
        duration and then ending with one of four ways:
            1 - visible
            2 = invisible
            3 = invisible and collapsed
            4 = removed
    
    #>
    FlickerVFX <public> (ThisWidget : widget, Duration : float, VFXEnd : int, LinkedPlayer : player)<suspends> : void =
        var Countdown : float = (Duration * 10)
        
        loop:
                ThisWidget.SetVisibility(widget_visibility.Hidden)
                Sleep(0.05)
                ThisWidget.SetVisibility(widget_visibility.Visible)
                Sleep(0.05)
                set Countdown = Countdown - 1.0
        
                if(Countdown = 0.0):

                    if (VFXEnd = 1):
                        ThisWidget.SetVisibility(widget_visibility.Visible)
                        
                    if (VFXEnd = 2):
                        ThisWidget.SetVisibility(widget_visibility.Hidden)
                    
                    if (VFXEnd = 3):
                        ThisWidget.SetVisibility(widget_visibility.Collapsed) 

                    if (VFXEnd = 4):
                        if (PlayerUI := GetPlayerUI[LinkedPlayer]):
                            PlayerUI.RemoveWidget(ThisWidget)           
                       
                    break

    <#
        EZUI.FadeVFX
        smoothly modifies the opacity of a color_block over a period
        (in seconds) between two values
    #>
    FadeVFX <public> (TargetWidget : color_block, FadeColor : color, InitialOpacity : float, FinalOpacity : float, FadeDuration : float) <suspends>: void =
        #Print("[EZUI] : FadeInVFX")

        var ElapsedTime : float = 0.0
        var StartTime : float = 0.0

        TargetWidget.SetColor(FadeColor)

        loop:
            CurrentTime := GetSimulationElapsedTime()

            if (StartTime = 0.0):
                set StartTime = CurrentTime

            set ElapsedTime = Min(FadeDuration , CurrentTime - StartTime)
            
            Value := Lerp(InitialOpacity, FinalOpacity, ElapsedTime / FadeDuration )
            OpacityValue: type{_X:float where 0.000000 <= _X, _X <= 1.000000 } = type{_X:float where 0.000000 <= _X, _X <= 1.000000 }[Clamp(Value, 0.0, 1.0)] or Err("Should be unfailable")
            TargetWidget.SetOpacity(OpacityValue)
            #Print("[EZUI] : Widget Opacity is {Value}")

            if (ElapsedTime = FadeDuration):
                break

            Sleep(0.0)
    

                    
<#
    a special thamks to: 
        Mayapple
        SprinterMax
        Daigorō
        UEFN Discord community

    ****************************************************************************************
    Made with EZUI, please follow @kryyative on Instagram Threads and @KryyssX on X (Twitter)
    for more useful Snippets, UEFN & UE5 news,tutorials and community spotlights!
    ****************************************************************************************

    If you found EZUI useful please include the text above in your credits to show your support
    for my work and encourage others to use EZUI for their projects. Thank you! ^_^
#>
Sign in to download module

Copy-paste each file above is always free.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in
    📄
    Source
    @int
    Epic Games Community
    @int

    Created by a member of the Epic Games community. Rights remain with the original author, under Epic's community content terms. Terms ↗

    View original Sources & licensing
    Request removal
    Last updated Jun 23, 2026
    Verse module (2 files)
    Compiles · verified Jun 24, 2026

    Download the full module (zip) from the code panel above.

    Keep exploring
    More in UI · 8 of 9
    Prev
    fortnite ezui popup with custom art fnc graphics support per player ui
    Next
    fortnite ezui container api module
    Related topics
    • Using Patchwork Speaker Devices In Fortnite Creative Devices
    • Using Post Processing Devices In Fortnite Creative Materials/Vfx
    • Using Patchwork Speaker Devices In Fortnite Creative Devices
    • Using First Person Camera Devices In Fortnite Creative Cinematics
    • Effects And Particle Systems In Unreal Editor For Fortnite Materials/Vfx

    Related

    Open in graph →

    Related topics

    • Using Patchwork Speaker Devices In Fortnite Creative
    • Using Post Processing Devices In Fortnite Creative
    • Using Patchwork Speaker Devices In Fortnite Creative
    • Using First Person Camera Devices In Fortnite Creative
    • Effects And Particle Systems In Unreal Editor For Fortnite
    VerseIsland · an archipelago of Verse & UEFN knowledge
    🗺️ Island atlas Learn Guides History About & Press Sources & Licensing Status

    Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

    🦜

    Scout · your island guide

    The Isle of Verse