VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Community Snippets›Verse Language·Up to Community Snippets · Verse Language·77 of 114 in Verse Language

VerseMaxxing Utility Functions

Utils

Verse from mandeep/VerseMaxxing (Snippets/Utils.verse), by mandeep, under the Apache-2.0 license. Pinned at commit 21832764c. Compile-checked and ready to adapt for UEFN.

  • using { /Fortnite.com/Characters }
    using { /Fortnite.com/Devices }
    using { /Fortnite.com/Teams }
    using { /Verse.org/Simulation }
    using { /Verse.org/Concurrency }
    using { /UnrealEngine.com/Temporary/Diagnostics }
    using { /UnrealEngine.com/Temporary/SpatialMath }
    using { /UnrealEngine.com/Temporary }
    
    
    
    Utils<public> := module:
        # Check if all elements in an array are equal
        AllElementsEqual<public>(Array: []int)<transacts>:logic=
            if (Array.Length <= 1):
                return true
    
            for (i := 1..Array.Length-1):
                if (Array[i] <> Array[0]):
                    return false
    
            true
    
        # Find any elements in an array that are not unique
        #
        # Returns a new array of elements that were found to be duplicates
        # Example: [0, 1, 1, 2, 2, 2] will return [1, 2]
        FindDuplicates<public>(Array: []int)<transacts>:[]int=
            if (Array.Length <= 1):
                return Array

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games documentation

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

Keep exploring
More in Verse Language · 77 of 114
Prev
mandeep versemaxxing cancelabletask
Next
sprintermax uefnversesnippets constants

Source

Epic Games documentation

mandeep

Apache-2.0

View original
VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

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