Why does not every object from array spawn?

hi there. i’m new to blueprint programm so please be patient with me. thx.

i have a blueprint that collects items (the “collector”) and an other blueprint that spawns them (the “storage”). Items shall pour in to the Storage without the wild explosions caused by spawning with overlaps. They shall pour in slowly and evenly.

Since i can not spawn them as fast as i can collect them, i store every collected object in an array and spawn from that array as fast as possible. more exactly: as soon as there is no longer a collision at spawn.

If it was spawned, i remove this index from the array. If it was not spawned i leave it in the array for spawning later.

For some reason, some objects just do never get spawned.
why?

thx for helping

since i can not spawn them as fast as i can collect them

Why not? What does it mean? Note that Tick means every frame - 60 (or more) times per second. Is spawning that many intentional? Also, nothing stops you from doing multiple things in a single frame. But Tick is not something you’d see responsible for spawning actors.

Perhaps you could elaborate on what the ideal end result is, as in - how it should work from the end user’s perspective? What are we making. How do the Collector and the Storage work?

You set it to Do Not Spawn yourself on the spawn node.


Also, a common evaluation trap:

You spawn one random item but potentially remove another random item. When a node with a white execution wire accesses data in a pure node (no execution wire), the node is evaluated every time. If you expect this…

… to generate the same number, you’ll get disappointed :innocent: The solution is to store random result and use it again later on, rather than re-generate a value.

hey there
edited the post

that second part… that might be on to something… ■■■■…

thx!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.