Potential bug - 100 prop limit on spawning props

Hi, I’m trying to make a game based on randomly generating grids of blocks but running into an issue where it stops spawning in props after 100 props have been generated. Is this a bug or an intended limit?

If it is intended, is there a way that it could be increased? I see how it could cause potential memory issues if the entire island was just spawned in, but maybe a device could be used to set the maximum number of props to be generated and that changes the amount of memory set aside for spawned props. Maybe the limit could be based on which props are actually spawned and stop spawning them after too much space has been used?

Here is my code for reference:

using { /Fortnite.com/Devices }
using { /Verse.org/Native }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /EpicGames.com/Temporary/Diagnostics }
using { /EpicGames.com/Temporary/SpatialMath }

log_minegenerator := class(log_channel){}

minegenerator := class(creative_device):
    Logger:log = log{Channel:=log_minegenerator}

    @editable
    var Blocks:[]creative_prop_asset := array{}
    var posx : float = 0.0
    var posy : float = 0.0
    var posz : float = 0.0

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        SpawnBlocks()

    SpawnBlocks()<suspends>:void=
        
        for (A:=0..4):
            set posy = 0.0
            set posx = posx + 130.0
            for (B:=0..4):
                set posz = 0.0
                set posy = posy + 130.0
                for (C:=0..4):
                 if(Prop := Blocks[GetRandomInt(0, Blocks.Length-1)]):
                    SpawnPosition:vector3:=vector3{X:=posx, Y:=posy, Z:=posz}
                    SpawnedProp := SpawnProp(Prop, SpawnPosition, IdentityRotation())
                 set posz = posz + 110.0
            Sleep(1.0) 

Tagging @Rodney_Houle since you posted the original example and might have some insight on this :slight_smile:

The limit is intentional, but we can revisit that limit later once we grab more data on memory and performance. Also, I believe the limit currently is 100 props per device, with a 200 prop limit max. Give it a try spawning props from two creative devices.

5 Likes

Good to know. Thank you!

1 Like

o/ does this limitation still holds ?
Edit: Answer: yes

does the limit still exist or has it been removed in the meantime?

So can I only spawn up to 100 props at once or in total. Like if I made it so everytime this prop is destroyed it respawns that same prop (so only one instance of this prop at any given time) could I keep spawning it forever?

I tested it and it turns out I can spawn pretty much an infinite amount of props using the prop spawner as long as I destroy the older ones before spawning in the new ones. So I think the 100 limit only applies to the amount of spawned props you can have in your map at any given time from that spawner.

1 Like