Double spawn on overlap box collision?

Hi,

I am currently working on a simple infinite runner game and I have one problem. Sometimes (like 1 in 7) modules are being spawned twice at the same location. I have 5 different modules with the same logic and looks, but each spawning different objects.

Here is the example of two tiles spawned at the same location, both with wall obstacle spawned.

Here one of the tiles moved to the right.
273801-
Every module looks like this, with two box collisions with overlap only pawn collision set. First for spawning next tile, second for destroying self. Location for next module spawn is being taken from ArrowComponent set same in every module.

BP for module looks like this

[link text][5] module class with Random_Module_Place function called from BP

[link text][6] video from the run where problem occurs but didn’t make path blocked

Any ideas on how to handle this problem?

Have you tried using a “cast” node after the overlap events? Right now ANY actor can cause a new tile to be spawned not just the player.

Do you mean this?
Problem still there.

I did try it and it didn’t work. Actually, I just found what was the problem. I had my original starting BP which was generating first 7 tiles. Somewhere there it was spawning 2 tiles at the same position, so it was duplicated from the very beginning.

Thanks for all the answers. :slight_smile:

Have you tried the Do Once Function?

273843-d1.png

I ran into a similar problem. I droped the spawn tiles from 9 to 5 and it did seem to stop ot from what i can tell

No one can help

Looks like we did, the OP said he found a solution. If you have a problem start a new thread and post your blueprints.