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

Get Random Positions On A Plane

1686 Views

Report

  • #Generate an array of random non-repeating positions in the same plane(Vertical)
        #<param name="startPos">Start position of the plane</param>
        #<param name="endPos">End position of the plane</param>
        #<param name="size">The spatial size of each object</param>
        #<param name="num">Number of positions to get</param>
        GetRandomPosInPlaneVertical(startPos: vector3 , endPos:vector3 , size:vector3, num: int ): []vector3=    
            #First, cut the plane into 'n' cells according to the size of the object.
            var sizePos :vector3= endPos - startPos; 
    
            var maxNum: int = 0
            var y:int = 0;
            var z:int = 0;
            if:
                tmpY:int = Int[sizePos.Y / size.Y] 
                tmpZ:int = Int[sizePos.Z / size.Z] 
    
            then:
                set maxNum = tmpY * tmpZ; 
                set y = tmpY 
                set z = tmpZ 
            #Arrange these cells into an array by serial number.
            var allList: []int = for (i:= 1..maxNum): 
                i

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 Vehicles · 1 of 3
Next
fortnite shine cards function

Source

Epic Games documentation

View original

Last updated 2026-07-26T12:16:26.299629+00:00

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